I really don't see the point of that kind of problems where you can't use Matlab built-in functions.
which functions?
1601 Solvers
1400 Solvers
1052 Solvers
615 Solvers
Return unique values without sorting
591 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!