Main Content

simscape.multibody.ExternalForce Class

Namespace: simscape.multibody

Construct external force

Since R2025a

Description

Use an object of the simscape.multibody.ExternalForce class to construct an external force that you can apply to a frame connector in a compiled multibody system.

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

force = simscape.multibody.ExternalForce constructs an external force of [0 0 0] N resolved along the axes of the frame to which the force applies.

force = simscape.multibody.ExternalForce(value,ResolutionFrame) constructs an external force with the specified value that is resolved along the axes of the specified resolution frame.

Input Arguments

expand all

Force, specified as a simscape.Value object that represents a 3-by-1 or 1-by-3 array with a unit of force.

Frame to resolve the applied force, specified as either Attached or World. Attached refers to the frame connector to which you apply this torque, while World refers to the world frame.

Examples

Create External Force

Create an external force that has a value of 5 N resolved along the x-direction of the world frame.

force = simscape.multibody.ExternalForce(simscape.Value([5 0 0],"N"),"World")
force = 

  ExternalForce

  Resolution Frame: World

  Value: [5 0 0] : N

Version History

Introduced in R2025a