This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Open Simscape Multibody model template and block library





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.


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


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


collapse all

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


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

Create a model named robotto from the Simscape Multibody template:


The solver type is auto.

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


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

Introduced in R2012a