Main Content

smnew

Open Simscape Multibody model template

Description

example

smnew creates a model from the Simscape™ Multibody™ template. The template includes several commonly used blocks and an automatic variable-step solver selection. Simscape data logging is enabled by default, with the data history limited to 10,000 data points.

example

smnew(modelName) adds an option to name the model built from the template.

example

smnew(modelName,solverType) adds an option to specify the Simulink® solver to use with the model.

Examples

collapse all

Create a model from the Simscape Multibody template at the MATLAB® command prompt:

smnew

The model name is untitled and the solver type is auto.

Create a model named robotto from the Simscape Multibody template:

smnew('robotto')

The solver type is auto.

Create a model named robotto with the Simulink solver type set to ode15s from the Simscape Multibody template:

smnew('robotto','ode15s')

Input Arguments

collapse all

Name of the model to create from the template. The name must conform to the MATLAB naming rules. Do not include the file path in the model name. If the specified character vector is invalid, the model is named untitled.

Example: 'robotto'

Data Types: char | string

Solver to use for simulation. The solver type must be a valid Simulink solver, such as ode45, or ode15s. For best performance, consider using a variable-step solver unless you have a specific need for fixed-step simulation.

Example: 'ode15s'

Data Types: char | string

Version History

Introduced in R2012a