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.
Project Euler: Problem 1, Multiples of 3 and 5
1528 Solvers
142 Solvers
Make a random, non-repeating vector.
3038 Solvers
416 Solvers
465 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!