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.

Derivatives

Compute a MATLAB S-Function's derivatives

Required

No

Language

MATLAB

Syntax

Derivatives(s)

Arguments

s

Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block

Description

The Simulink® engine invokes this optional method at each time step to compute the derivatives of the S-function's continuous states. This method should store the derivatives in the S-function's state derivatives vector. In a Level-2 MATLAB® S-function, use the run-time object's Derivatives method.

Each time the Derivatives routine is called, it must explicitly set the values of all derivatives. The derivative vector does not maintain the values from the last call to this routine. The memory allocated to the derivative vector changes during execution.

Example

For a Level-2 MATLAB S-function example, see msfcn_limintm.m.

Introduced in R2012b

Was this topic helpful?