It needs more test cases. It is not clear what the output should be for all possible x.
Back to basics 22 - Rotate a matrix
768 Solvers
Return elements unique to either input
556 Solvers
Find the index of n in magic(n)
164 Solvers
428 Solvers
Replace secondary diagonal elements of a square array
122 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!