Documentation

ssc_new

Create new Simscape model populated by required and commonly used blocks

Syntax

ssc_new
ssc_new('modelname')
ssc_new('modelname','domain')

Description

ssc_new creates a new Simscape™ model, with required and commonly used blocks already on the model canvas. The model uses the recommended solver VariableStepAuto with the absolute tolerance, AbsTol, set to 1e-3.

The function also turns on simulation data logging for the whole model, using the default workspace variable name simlog and limiting the logged simulation data to 10000 points. For more information, see Data Logging.

By default, the function uses the Simulink® default new model name untitled and the recommended solver VariableStepAuto.

ssc_new('modelname') creates a new Simscape model with the specified name.

ssc_new('modelname','domain') creates a new Simscape model with the specified name and with domain-specific blocks added to the model canvas. Valid domains types are 'electrical', 'gas', 'hydraulic', 'magnetic', 'rotational', 'translational', 'thermal', 'thermal_liquid', and 'two_phase_fluid'.

Using the ssc_new to create a model is equivalent to opening the corresponding Simscape template from the Simulink Start Page.

Examples

Create a Generic Simscape Model

To create a generic Simscape model, type:

ssc_new

The software creates a new untitled model, with the default solver set to VariableStepAuto. The model contains a Solver Configuration block, a Simulink-PS Converter block, and a PS-Simulink Converter block connected to a Scope block.

Note

By default, Simulink Editor hides the block names in the model diagram. To display hidden block names, select Display and clear the Hide Automatic Names check box.

After using ssc_new, continue developing your model by copying the blocks, as needed, and adding other blocks from the Simscape libraries. Double-clicking the Open Simscape Library block opens the main Simscape library.

Create a Hydraulic Model with Specified Name

To create a hydraulic model, called hydraulic_actuator, type:

ssc_new('hydraulic_actuator','hydraulic')

The software creates the following model.

After using ssc_new, continue developing your model by copying the blocks, as needed, and adding other blocks from the Simscape libraries. Double-clicking the Open Simscape Library block opens the main Simscape library. Double-clicking the Open Hydraulic Library block opens the Hydraulic sublibrary in the Foundation library.

Introduced in R2009a

Was this topic helpful?