Main Content

simulink.compiler.configureForDeployment

Configure Simulink.SimulationInput object for deployment with Simulink Compiler

Since R2020a

Description

example

in = simulink.compiler.configureForDeployment(in) configures the Simulink.SimulationInput object, in, to be compatible for deployment with Simulink® Compiler™. simulink.compiler.configureForDeployment sets the simulation mode to Rapid Accelerator and the model parameter, RapidAcceleratorUpToDateCheck to off for the model used in Simulink.SimulationInput object, in, these settings ensure that the specified inputs does not require the deployed applications to be rebuilt.

Examples

collapse all

This example shows how to configure a Simulink.SimulationInput object for deployment as a command line executable or an application with Simulink Compiler.

This example uses the model sldemo_suspn_3dof. Create a function that you want to deploy as a standalone executable. In the function, create a Simulink.SimulationInput object for the model sldemo_suspn_3dof. Using the setVariable method of the Simulink.SimulationInput object, set the variable Mb to 1000.

Use the simulink.compiler.configureForDeployment function to make the Simulink.SimulationInput object compatible for deployment. Once the Simulink.SimulationInput object is configured for deployment, simulate it with the sim command.

function deployedScript()
    in = Simulink.SimulationInput('sldemo_suspn_3dof');
    in = in.setVariable('Mb', 1000);
    in = simulink.compiler.configureForDeployment(in);
    out = sim(in);
end

Input Arguments

collapse all

A Simulink.SimulationInput object or an array of Simulink.SimulationInput objects that is used to specify changes to the model for a simulation.

Example: in = Simulink.SimulationInput('vdp')

Version History

Introduced in R2020a