How do I know when to use loops and when to use vectorization?
Show older comments
In this question, the solution is achieved by using a loop. I thought this could have been achieved only through vectors.
What is the rule of thumb regarding when to use loops and when to use vectors only?
1 Comment
KSSV
on 3 Oct 2017
There is no rule of thumb.....vector is suggested always...in MATLAB.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!