# SinePattern

AnalysisLibErrType SinePattern (int numberOfElements, double amplitude, double phase, double numberOfCycles, double sinePattern[]);

## Purpose

Generates an array with a sinusoidal pattern. SinePattern obtains the element of the double-precision output array using the following formula:

SinePattern assumes the phase value is in degrees and not in radians.

To generate a cosinusoidal pattern, set phase to 90 degrees.

### Example

/* The following code generates a cosinusoidal pattern. */
double x[8], amp, phase, cycles;
int n;
n = 8;
amp = 1.0;
phase = 90.0;
cycles = 1.5;
SinePattern (n, amp, phase, cycles, x);

## Parameters

Input
Name | Type | Description
numberOfElements | integer | Number of elements to generate in the sinusoidal pattern.
amplitude | double-precision | The peak amplitude of the sinusoidal pattern. Default Value: 1.0.
phase | double-precision | The initial phase value, in degrees, used in generating the sinusoidal pattern. To generate a cosine pattern, set phase to 90.0. Default Value: 0.0.
numberOfCycles | double-precision | Number of cycles in the sinusoidal pattern. Default Value: 1.0.
Output
Name | Type | Description
sinePattern | double-precision array | Generated sinusoidal pattern.

## Return Value

Name | Type | Description
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.