dotnetCHARTING Send comments on this topic.
AddCosineSum Method
See Also 
dotnetCHARTING Namespace > ForecastEngine.Options Class : AddCosineSum Method


cosCoeff
An array where the k-th term is the coefficient of the (k+1)-th term of the sum of Cosine terms (i.e. a_k).
coefficient
An array where the k-th term is the coefficient of the Cosine term of the (k+1)-th term of the sum of the Cosine terms (i.e. b_k).
constant
An array where the k-th term is the constant shift in the x-axis of the Cosine term of the (k+1)-th term of the sum of Cosine terms (i.e. c_k).
exponent
An array where the k-th term is the exponent of the Cosine term within the (k+1)-th term of the sum of the Cosine terms (i.e. n_k).
Adds a sum a Cosine functions to an elements of the function basis.

Syntax

Visual Basic (Declaration)  
Public Shared Sub AddCosineSum( _
   ByVal cosCoeff() As Double, _
   ByVal coefficient() As Double, _
   ByVal constant() As Double, _
   ByVal exponent() As Double _
) 
Visual Basic (Usage) Copy Code
Dim cosCoeff() As Double
Dim coefficient() As Double
Dim constant() As Double
Dim exponent() As Double
 
ForecastEngine.Options.AddCosineSum(cosCoeff, coefficient, constant, exponent)
C#  
public static void AddCosineSum( 
   double[] cosCoeff,
   double[] coefficient,
   double[] constant,
   double[] exponent
)

Parameters

cosCoeff
An array where the k-th term is the coefficient of the (k+1)-th term of the sum of Cosine terms (i.e. a_k).
coefficient
An array where the k-th term is the coefficient of the Cosine term of the (k+1)-th term of the sum of the Cosine terms (i.e. b_k).
constant
An array where the k-th term is the constant shift in the x-axis of the Cosine term of the (k+1)-th term of the sum of Cosine terms (i.e. c_k).
exponent
An array where the k-th term is the exponent of the Cosine term within the (k+1)-th term of the sum of the Cosine terms (i.e. n_k).

Remarks

Please note that the k-th term of the sum which makes up the basis function will take to form:

k-th Term = a_k * (Cosn_k (b_k * x + c_k)),

where the Cosine function is in terms of radians, and a_k, n_k, b_k, c_k are real numbers. Please, in order to construct the sum you just sum over k starting at 0.

Notes on the Radian measure

Radians are a means by which to describe the angle and are related to the more commonly used degrees as follows:

360 degrees = 2 * Pi * radians

therefore, 1 radian = 180 / Pi degrees = 57.295... degrees.

See Also