Advanced Analysis Library Only
AnalysisLibErrType Ramp (int numberOfElements, double initialValue, double finalValue, double ramp[]);
Generates an output array that represents a ramp pattern. Ramp obtains the element of the output array using the formula:
rampi = initial + iΔx where
Setting the final value less than the initial value generates a negatively sloped ramp pattern.
/* The following code generates the pattern {-5.0, -4.0, -3.0, -2.0, -1.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0}. */
double rampvals[11], first, last;
int n;
n = 11;
first = -5.0;
last = 5.0;
Ramp (n, first, last, rampvals);
Input | ||
Name | Type | Description |
numberOfElements | integer | Number of elements to generate in the ramp pattern. |
initialValue | double-precision | Base value of the ramp pattern to generate. Default Value: 0.0. |
finalValue | double-precision | Final value of the ramp pattern to generate. If finalValue is greater than initialValue, Ramp generates a positively sloped ramp. To generate a negatively sloped ramp pattern, set finalValue less than initialValue. Default Value: 1.0. |
Output | ||
Name | Type | Description |
ramp | double-precision array | Generated ramp 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. |