Get an element of a block's mode vector
int_T ssGetModeVectorValue(SimStruct *S, int_T elementx)
S
SimStruct representing an S-Function block.
elementx
Index of a mode vector element.
An int_T
value for the element of the mode vector specified by
the index elementx
. Returns NULL
if no value
was assigned into the elementx
element of the mode vector.
Use to obtain the specified mode vector element, where the element index start at 0 and end at the total number of modes minus 1.
C, C++
The following statement
int_T v = ssGetModeVectorValue(S, 0);
is equivalent to
int_T* wv = ssGetModeVector(S); int_T v = wv[0];