HyperWorks Solvers

FORCOS

FORCOS

Previous topic Next topic No expanding text in this topic  

FORCOS

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Utility/General

Definition

Evaluates a Fourier Cosine.  A Fourier Cosine series is a collapsed version of a Fourier series, where the factors multiplying the SIN() terms are all zero.

Use

This function can be called by any user-defined subroutine.

Calling Syntax

Fortran

CALL FORCOS (X, X0, W, PAR, NPAR, IORD, VALUE, ERRFLG)

 

C

c_forcos(x, x0, w, par, npar, iord, value, errflg)

 

Python

[value, errflg] = py_forcos(x, x0, par, npar, iord)

 

MATLAB

[value, errflg] = m_forcos(x, x0, par, npar, iord)

Input Arguments

X [double precision]

The independent variable.  For example, to specify time as the independent variable, specify X as TIME.

 

X0 [double precision]

The shift in the Fourier Cosine series.

 

W [double precision]

The fundamental frequency of the Fouries series.  It is assumed to be specified in radians per unit of X unless a D is used after the value.

 

PAR [double precision]

The array of coefficients.

 

NPAR [integer]

The number of coefficients specified.

 

IORD [integer]

The order of the derivative that FORCOS has to return.  Order can be 0, 1 or 2.

Output Values

VALUE [integer]

The value that the subroutine returns.

 

ERRFLG [logical]

A logical (true or false) variable that FORCOS returns to the calling subroutine.  If FORCOS detects an error while calling a subroutine, it sets the error flag to true.

See Also:

Data Access Subroutines