Rotation Matrix

Version (2.41 KB) by Jan
Rotation matrix in 2D, 3D and N-D
Updated 30 Sep 2022

View License

RotMatrix - N-dimensional Rotation matrix
R = RotMatrix(alpha, u, v)
alpha: Angle of rotation in radians, counter-clockwise direction.
u, v: If just the input alpha is provided, a 2D matrix is replied.
For 1 input u, the 3D rotation matrix is created. u must have 3
If u and v are used as inputs, the N-dimensional rotation is
performed in the hyperplane spanned by u and v. Note, that there is
no unique axis of rotation in N>3 dimensions.
u and v are normalized automatically and in the N-D case v is made
orthogonal to u.
The dimension of u and v determine the dimension of the output.
R: Rotation matrix.

Cite As

Jan (2024). Rotation Matrix (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on 3-D Scene Control in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Help section improved.