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.


Get the derivatives of a block's continuous states


real_T *ssGetdX(SimStruct *S)



SimStruct representing an S-Function block or Simulink® model.


A pointer (real_T *) to an array containing the derivatives of the continuous states of S, which can be a block or the model. Returns NULL if there are no continuous states.


Use this macro in mdlDerivatives to get the derivatives of a model or block's continuous states. Use ssGetNumContStates(S) to get the length of the array.

    Note   The pointer returned by this macro changes as the solver evaluates different integration stages to compute the integral.


C, C++


See the S-function csfunc.c used in sfcndemo_csfunc and the S-function sfun_atol.c used in sfcndemo_sfun_atol for examples using this function.

Introduced before R2006a

Was this topic helpful?