I really don't see the point of that kind of problems where you can't use Matlab built-in functions.
which functions?
3892 Solvers
312 Solvers
1882 Solvers
Back to basics 25 - Valid variable names
293 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!