Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ssGetDWorkComplexSignal

Determine whether the elements of a data type work vector are real or complex numbers

Syntax

CSignal_T ssGetDWorkComplexSignal(SimStruct *S, int_T vector)

Arguments

S

SimStruct representing an S-Function block.

vector

Index of a data type work vector, where the index is one of 0, 1, 2, ... ssGetNumDWork(S)-1.

Returns

COMPLEX_YES (1) if the specified vector contains complex numbers; otherwise, COMPLEX_NO (0).

Description

Use to determine the numeric type of the DWork vector specified by the index vector.

Languages

C, C++

Example

The following example throws an error if the first DWork vector is not complex.

CSignal_T cs = ssGetDWorkComplexSignal(S, 0);
if(cs == COMPLEX_NO) {
     ssSetErrorStatus(S,"Signal must be complex.");
}

Introduced before R2006a

Was this topic helpful?