Problem 43012. Rotate array 90 degrees

Rotate the given matrix by 90 degrees.

Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

Solution Stats

92.0% Correct | 8.0% Incorrect
Last Solution submitted on Nov 29, 2025

Solution Comments

Show comments

Problem Recent Solvers156

Suggested Problems

Community Treasure Hunt

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

Start Hunting!