Problem 1830. Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle will always be multiples of 90 degrees.
e.g A = [1 2 3; 4 5 6; 7 8 9] Angle = 90
Output Matrix = [3 6 9; 2 5 8; 1 4 7]
Happy clocking !!
Solution Stats
Problem Comments
-
2 Comments
Jean-Marie Sainthillier
on 15 Aug 2013
Error in test 4.
Swapnali Gujar
on 15 Aug 2013
Sorry Jean-Marie, I just corrected test 4, thanks for informing :)
Solution Comments
Show commentsProblem Recent Solvers117
Suggested Problems
-
Remove the two elements next to NaN value
678 Solvers
-
Set the array elements whose value is 13 to 0
1413 Solvers
-
Create a vector whose elements depend on the previous element
747 Solvers
-
Find and replaces spaces from a input string with *
166 Solvers
-
395 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!