I really don't see the point of that kind of problems where you can't use Matlab built-in functions.
which functions?
Back to basics 20 - singleton dimensions
254 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
Given a 4x4 matrix, swap the two middle columns
515 Solvers
373 Solvers
2769 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!