Main Content

euler

R2026b

Orientation of pose object as Euler angles

Since R2026b

    Description

    Add-On Required: This feature requires the 3D Scenarios add-on.

    eul = euler(p) calculates the orientation of the pose as Euler angles using the default "321" sequence in degrees.

    eul = euler(p,Name=Value) calculates the Euler angles using options specified by one or more name-value arguments.

    [eul,eulAlt] = euler(p,Name=Value) also returns an alternate set of Euler angles that represents the same rotation as eul.

    Input Arguments

    collapse all

    Pose, specified as a array of pose objects.

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: euler(p,Sequence="YXZ",Units="radians") calculates the Euler angles using the "YXZ" rotation sequence in radians.

    Rotation sequence, specified as one of these string scalars:

    • "ZYX"

    • "ZYZ"

    • "ZXY"

    • "ZXZ"

    • "YXY"

    • "YZX"

    • "YXZ"

    • "YZY"

    • "XYX"

    • "XYZ"

    • "XZX"

    • "XZY"

    Each character indicates the corresponding axis. For example, if the sequence is "ZYX", then the three specified Euler angles are interpreted in order as a rotation around the z-axis, a rotation around the y-axis, and a rotation around the x-axis.

    Basis vectors for the Euler angles, specified as "auto", "flu", or "frd". This value specifies whether the basis for the Euler angles use a forward-left-up (FLU) or forward-right-down (FRD) convention.

    The default, "auto", selects a convention based on the AxesConvention property of the reference frame for the pose object. When the ReferenceFrame property is empty, the default convention is FLU.

    Axes ConventionCorresponding Basis
    "ned""frd"
    "enu""flu"
    "flu""flu"
    "frd""frd"
    "xyz""flu"

    Angle units, specified as "degrees" or "radians".

    Output Arguments

    collapse all

    Euler rotation angles, returned as an m-by-3 matrix, where m is the number of elements in p.

    Alternate Euler rotation angle solution, returned as an m-by-3 matrix.

    Version History

    Introduced in R2026b