so2 object represents an SO(2) rotation in
For more information, see the 2-D Orthonormal Rotation Matrix section.
This object acts like a numerical matrix, enabling you to compose rotations using multiplication and division.
rotation = so2 creates an SO(2) rotation representing an
identity rotation with no translation.
rotation = so2( creates an SO(2)
rotation representing a pure rotation defined by the
rotation = so2( creates an
SO(2) rotation from the SE(2) transformation
If any inputs contain more than one rotation, the output
is an N-element array of
corresponding to each of the N input rotations.
rotation — Orthonormal rotation
2-by-2 matrix | 2-by-2-by-N matrix |
so2 object | N-element array of
Orthonormal rotation, specified as a 2-by-2 matrix, a
3-by-3-by-N array, a scalar
so2 object, or an
N-element array of
N is the total number of rotations.
rotation is an array, the resulting number of created
so2 objects in the output array is equal to
transformation — Homogeneous transformation
3-by-3 matrix | 3-by-3-N array |
se2 object | N-element array of
Homogeneous transformation, specified as a 3-by-3 matrix, a 3-by-3-N array, a scalar
se3 object, or an N-element array of
se2 objects. N is the total number of transformations specified.
transformation is an array, the resulting number of created
so2 objects is equal to N.
angle — z-axis rotation angle
z-axis rotation angle, specified as an N-by-M matrix. Each element of the matrix is an angle, in radians, about the z-axis. The
so2 object creates an
so2 object for each angle.
angle is an N-by-M matrix, the resulting number of created
so2 objects is equal to N.
The rotation angle is counterclockwise positive when you look along the axis toward the origin.
Create SO(2) Rotation Using Angle
Define an angle rotation of
pi/4 and a xy translation of
angle = pi/4;
Create an SO(2) rotation using the angle.
R = so2(angle,"theta")
R = so2 0.7071 -0.7071 0.7071 0.7071
2-D Orthonormal Rotation Matrix
SO(2) rotation matrices are 2-by-2 orthonormal matrices that represent a rotation about a single axis 2-D Euclidean space. SO(2) rotations have many special properties. For example, SO(2) rotation matrices are in the 2-D special orthogonal group, so the product of two SO(2) rotation matrices is an SO(2) rotation matrix. This enables you to compose rotations from multiple rotations.
This is a 2-D orthonormal rotation matrix that describes describe a rotation θ about the z-axis:
These are other properties of SO(2) rotations:
Each column is both orthogonal and a unit vector, meaning that none of the columns are multiples of each other.
The determinant of the matrix is positive 1.
The inverse of the matrix is the same as the transpose of the matrix: R-1 = RT.