Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

smnew

Open Simscape Multibody model template and block library

Syntax

smnew
smnew(modelName)
smnew(modelName,solverType)

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

See Also

Introduced in R2012a

Was this topic helpful?