Contenuto principale

massDistribution

R2026b

Class: simscape.multibody.GeneralInertia
Namespace: simscape.multibody

Extract mass distribution of inertia

Since R2026b

Description

md = massDistribution(inertia) extracts the mass distribution of the specified inertia and returns the result as a simscape.multibody.MassDistribution object. The returned values are always in SI units regardless of the units used to define the inertia properties.

example

Input Arguments

expand all

Inertia, specified as a simscape.multibody.GeneralInertia object.

Output Arguments

expand all

Mass distribution of the inertia relative to its implicit reference frame, returned as a simscape.multibody.MassDistribution object.

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Examples

expand all

This example shows how to create an inertia object and extract its mass distribution.

Create a GeneralInertia object with a mass of 5.5 lbm, a center of mass at [4 0 0] in, and moments of inertia of [800 1000 1200] lbm*in^2.

inertia = simscape.multibody.GeneralInertia( ...
    simscape.Value(5.5,"lbm"), ...
    simscape.Value([4 0 0],"in"), ...
    simscape.Value([800 1000 1200],"lbm*in^2"), ...
    simscape.Value([0 0 0],"lbm*in^2"));

Extract the mass distribution of the inertia object. The returned values are in SI units.

md = massDistribution(inertia)
md =
  MassDistribution with properties:

                 Mass: 2.4948 (kg)
         CenterOfMass: [0.1016 0 0] (m)
     MomentsOfInertia: [0.2341 0.2926 0.3512] (kg*m^2)
    ProductsOfInertia: [0 0 0] (kg*m^2)

Version History

Introduced in R2026b