I'd suggest adding test cases in which n (or abs(n)) is larger than the dimension of x; for example, x is a 4-by-4 matrix and n = 6.
895 Solvers
Create a function handle that reverses the input arguments of another function handle
124 Solvers
207 Solvers
445 Solvers
158 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!