Main Content

sldvextract

Extract subsystem or subchart contents into new model for analysis

Description

example

newModel = sldvextract(subsystem) extracts the contents of the atomic subsystem subsystem and creates a model for the Simulink® Design Verifier™ software to analyze. sldvextract returns the name of the new model in newModel. If the model name exists, sldvextract uses the subsystem name for the model name, appending a number to the model name.

example

newModel = sldvextract(subchart) extracts the contents of the atomic subchart subchart and creates a model for the Simulink Design Verifier software to analyze. Specify the full path of the atomic subchart in subchart. If the model name exists, sldvextract uses the subchart name for the model name, appending a number to the model name.

Note

If the atomic subchart calls an exported graphical function that is outside the subchart, sldvextract creates the model, but the new model will not compile.

example

newModel = sldvextract(exportfcnmodel) creates a scheduler model that invokes the export-function model exportfcnmodel for analysis by Simulink Design Verifier. sldvextract returns the name of the new model in newModel. The newModel consists of exportfcnmodel model name with a suffix SldvScheduler. If the model name already exists, sldvextract uses the exportfcnmodel name for the model name, appending a number to the model name.

newModel = sldvextract(subsystem, showModel) and newModel = sldvextract(subchart, showModel) opens the extracted model when you set showModel to true. If showModel is set to false, the extracted model is only loaded into workspace.

Examples

collapse all

Extract the atomic subsystem Bus Counter from the sldemo_mdlref_conversion model and copy it to a new model.

open_system('sldemo_mdlref_conversion');
newmodel = sldvextract('sldemo_mdlref_conversion/Bus Counter', true);

Extract the atomic subchart, Sensor1, from the sf_atomic_sensor_pair model and copy it to a new model.

open_system('sf_atomic_sensor_pair');
newmodel = sldvextract('sf_atomic_sensor_pair/RedundantSensors/Sensor1',...
		true);

Create the scheduler model that invokes the sldvExportFunction_autosar_multirunnables model.

addpath(fullfile(docroot,'toolbox','sldv','examples'));
open_system('sldvExportFunction_autosar_multirunnables');
newmodel = sldvextract('sldvExportFunction_autosar_multirunnables');

Input Arguments

collapse all

Full path to the atomic subsystem.

Full path to the Stateflow® atomic subchart.

Full path to the export-function model.

Logical value that indicates whether to display the extracted model.

Output Arguments

collapse all

Name of the new model.

Introduced in R2007a