rot90 in 3D
This function extends the rot90 command to 3D. So you can rotate a 3D matrix by 90degrees about the x-axis, y-axis, or z-axis. It is kind of hard to visualize in your head but I am pretty sure it works correctly. There is a test matrix included in the comments for the file.
Cite As
Matt Fetterman (2024). rot90 in 3D (https://www.mathworks.com/matlabcentral/fileexchange/25546-rot90-in-3d), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.4.0.0 | Thanks to Jan for sending me this corrected version ! |
||
1.3.0.0 | updated as suggested by Jan Simon. Makes it faster by removing loops ! |
||
1.2.0.0 | I corrected the description to clarify that it rotates about x, y, or z-axis. |
||
1.1.0.0 | In the comments, the test matrix smoki was not as I had intended. |
||
1.0.0.0 |