FORSIN

Utility/GeneralEvaluates a Fourier Sine. A Fourier Sine series is a collapsed version of a Fourier series where the factors multiplying the COS() terms are all zero.

Use

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

Format

Fortran Calling Syntax
CALL FORSIN (X, X0, W, PAR, NPAR, IORD, VALUE, ERRFLG)
C/C++ Calling Syntax
c_forsin(x, x0, w, par, npar, iord, value, errflg)
Python Calling Syntax
[value, errflg] = py_forsin(x, x0, par, npar, iord)
MATLAB Calling Syntax
[value, errflg] = m_forsin(x, x0, par, npar, iord)

Attributes

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 Fourier 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 FORSIN has to return. Order can be 0, 1 or 2.

Output

Value
[integer]
A value that subroutine returns.
Errflg
[logical]
A logical (true or false) variable that FORCOS returns to the calling subroutine. If FORCOS detects an error while calling the subroutine, it sets the error flag to true.