Since Cody, I dislike for-loops, but your solution is way simpler than my own algorithm. Mission accomplished...
Nevertheless, I would hope for a non-looped piece of code. Let's see in phase 3.
482 Solvers
Find a subset that divides the vector into equal halves
332 Solvers
309 Solvers
Return fibonacci sequence do not use loop and condition
218 Solvers
Number of Even Elements in Fibonacci Sequence
665 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!