Show older comments
hi 2 all, Can anyone say how to reduce execution time of 'for loop' in matlab How to replace for loop?
Accepted Answer
More Answers (1)
Walter Roberson
on 16 Aug 2011
0 votes
The one sure way to reduce the execution time of a for loop is to eliminate that section of code.
Anything else depends on exactly what your for loop contains. There are some for loops that are now faster than vectorizing or using one of the library routines -- faster even than using a mex routine.
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!