Main Content

simscape.multibody.QuaternionRotation Class

R2026b

Namespace: simscape.multibody
Superclasses: simscape.multibody.Rotation

Construct rotation by using unit quaternion

Since R2022a

Description

Use an object of the simscape.multibody.QuaternionRotation class to construct a 3-D rotation by using a unit quaternion. A unit quaternion is a four-element unit vector,

Q=(SV),

where:

S=cos(θ2),

and

V=[UxUyUz]sin(θ2).

θ is the angle of rotation and [Ux, Uy, Uz] is the unit vector of the rotational axis. Note that for any given rotation, there are two quaternions that are negatives of each other, but represent the same rotation. For example, the quaternions [1 0 0 0] and [-1 0 0 0] both represent the identity rotation.

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

R = simscape.multibody.QuaternionRotation creates a rotation with default quaternion.

R = simscape.multibody.QuaternionRotation(Quaternion) creates a rotation with the specified quaternion.

Properties

expand all

Unit quaternion, specified as a 1-by-4 double array that represents a four-element unit vector.

Example: [0.70711 0.40825 0.40825 0.40825]

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Version History

Introduced in R2022a