I think that in test case 1 the answer should be [1 5].
Maybe the problem statement should specifically exclude the first and last elements?
Create an index-powered vector
352 Solvers
262 Solvers
376 Solvers
Find the index of n in magic(n)
160 Solvers
260 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!