getSimulateUsingImpl

Specify value for Simulate using parameter

Syntax

simmode = getSimulateUsingImpl

Description

simmode = getSimulateUsingImpl specifies the simulation mode of the System object™ implemented in a MATLAB System block. The simulation mode restricts your System object to simulation using either code generation or interpreted execution. The associated showSimulateUsingImpl method controls whether the Simulate using option is displayed on the dialog box.

getSimulateUsingImpl is called by the MATLAB System block.

Note

You must set Access = protected and Static for this method.

Output Arguments

simmode

Simulation mode, returned as the character vector 'Code generation' or 'Interpreted execution'. If you do not include the getSimulateUsingImpl method in your class definition file, the simulation mode is unrestricted. Depending on the value returned by the associated showSimulateUsingImpl method, the simulation mode is displayed as either a dropdown list on the dialog box or not at all.

Examples

expand all

In the class definition file of your System object, define the simulation mode to display in the MATLAB System block. To prevent Simulate using from displaying, see showSimulateUsingImpl.

 methods (Static, Access = protected)
    function simMode = getSimulateUsingImpl
       simMode = "Interpreted execution";
    end
 end