Main Content

visualize

Class: simscape.multibody.CompiledMultibody
Namespace: simscape.multibody

Visualize compiled multibody system in given state

Since R2022a

Description

visualize(cmb,state,modelName) opens the Multibody Explorer to display the 3-D graphical representation of the compiled multibody system, cmb, in the given state, state.

If the Multibody Explorer is already open and you call the visualize method with the same model name, it updates the existing model in the Multibody Explorer. However, if you call the visualize method with a different model name, it opens a new instance of the Multibody Explorer to display the updated compiled multibody system.

If the given state has a status other than simscape.multibody.StateStatus.Valid, you can still use the visualize method to view the compiled multibody system, although some of the kinematic loops in the system may not be closed.

Input Arguments

expand all

Compiled multibody system, specified as a simscape.multibody.CompiledMultibody object.

State of the compiled multibody system, specified as a simscape.multibody.State object. The state object includes the position and velocity of every joint primitive in the compiled multibody system.

Name of the tabbed pane in which to display the compiled multibody system, specified as a string scalar or character vector. The name must be a valid MATLAB® identifier. You can use the isvarname function to check if the name is a valid identifier.

Example: 'Rocker_Down'

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a