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.
Find the sum of all the numbers of the input vector
32030 Solvers
132 Solvers
Implement a bubble sort technique and output the number of swaps required
153 Solvers
Sum the real and imaginary parts of a complex number
115 Solvers
163 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!