Main Content

tilt

Tilt angle

Since R2023b

Description

T = tilt(orientations) returns the tilt angles based on the specified orientations. See Tilt Angle Definition for more details.

example

Examples

collapse all

Define four sets of Euler angles and obtain their corresponding quaternions.

angles = [0 0 0; 0 0 10; 0 0 170; 0 0 190];
quats = quaternion(angles,"eulerd","ZYX","frame");

Obtain the tilt angles and convert their units to degrees.

tiltAngles = rad2deg(tilt(quats))
tiltAngles = 4×1

         0
   10.0000
  170.0000
  170.0000

Input Arguments

collapse all

Orientations, specified as an N-by-1 vector of quaternion objects or as a 3-by-3-by-N array of rotation matrices. N is the total number of orientations.

Output Arguments

collapse all

Tilt angles, in radians, returned as an N-element column vector of scalars in the range [0, pi]. N is the total number of orientations.

More About

collapse all

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2023b