matlab axang2quat
时间: 2023-10-31 11:26:23 浏览: 32
The axang2quat function in MATLAB converts an axis-angle representation of a rotation to a quaternion representation.
Syntax:
q = axang2quat(axang)
Input:
axang - Axis-angle rotation representation as a 1-by-4 vector, where the first three elements represent the axis of rotation and the fourth element represents the angle of rotation in radians.
Output:
q - Quaternion representation of the rotation as a 1-by-4 vector, where the first three elements represent the imaginary components and the fourth element represents the real component.
Example:
% Convert axis-angle representation of rotation to quaternion
axang = [0.7071, 0, 0.7071, pi/4]; % Rotation of pi/2 radians around the y-axis
q = axang2quat(axang)
Output:
q = [0.9239, 0, 0.3827, 0]