Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 1830. Matrix rotation as per given angle

Created by Swapnali Gujar

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 !!

Problem Group

Solution Statistics

59 correct solutions 27 incorrect solutions
Last solution submitted on May 26, 2016

Problem Comments