compare loops and matrix computation.
8 views (last 30 days)
Show older comments
Hi, all,
I recently found that Matlab executes matrix/vector computation pretty fast than scalar computation with loops. For example, if I used loops to execute algorithm, it is very slow. If I convert it to vector or matrix, it is faster.
I was told about this fact before, is there any explanation on it?
The bad thing is that you cannot always use matrix to replace loops...
Thanks.
0 Comments
Accepted Answer
More Answers (0)
See Also
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!