Advanced Analysis Library Only
AnalysisLibErrType Triangle (int numberOfElements, double amplitude, double triangle[]);
Generates an output array that has a triangular pattern. Triangle obtains the element of the double-precision output array using the following formulas:
/* The following code generates the pattern tri = {0.0, 1.0, 2.0, 3.0, 4.0,
3.0, 2.0, 1.0}. */
double tri[8], amp;
int n;
n = 8;
amp = 4.0;
Triangle (n, amp, tri);
Input | ||
Name | Type | Description |
numberOfElements | integer | Number of elements to generate in the triangular pattern. |
amplitude | double-precision | Peak amplitude of the triangular pattern. Default Value: 1.0. |
Output | ||
Name | Type | Description |
triangle | double-precision array | Generated triangular pattern. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |