This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Compute the signals that this MATLAB S-function block emits









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


The Simulink® engine invokes this required method at each simulation time step. In a Level-2 MATLAB S-function, the Outputs method calculates the S-function's outputs at the current time step and store the results in the run-time object's OutputPort(n).Data property. In addition, for S-functions with a variable sample time, the Outputs method computes the next sample time hit.

Use the run-time object method IsSampleHit to determine if the current simulation time is one at which a task handled by this block is active. For port-based sample times, use the IsSampleHit property of the run-time object's InputPort or OutputPort methods to determine if the port produces outputs or accepts inputs at the current simulation time step.

Set the run-time object's NextTimeHit property to specify the time of the next sample hit for variable sample-time S-functions.

Introduced in R2012b