SinePattern
AnalysisLibErrType SinePattern (ssize_t numberOfElements, double amplitude, double phaseDegrees, double numberOfCycles, double sinePattern[]);
Purpose
Generates an array with a sinusoidal pattern. SinePattern obtains the ith 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 Code
/* 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 | ssize_t | Number of elements to generate in the sinusoidal pattern. |
amplitude | double | The peak amplitude of the sinusoidal pattern. Default Value: 1.0. |
phase_Degrees | double | 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 | Number of cycles in the sinusoidal pattern. Default Value: 1.0. |
Output | ||
Name | Type | Description |
sinePattern | double [] | 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. |
Additional Information
Library: Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later