Replace for loop with cell function to reduce run time
4 次查看(过去 30 天)
显示 更早的评论
My question is regarding to improve performance of code so that it will take less time, I want to replace for loop in my program with cellfunc() because i am performing operation on cells, will it be more faster than for loop?
Thanks
0 个评论
回答(1 个)
Walter Roberson
2013-12-25
编辑:Walter Roberson
2013-12-25
Not necessarily. You need to experiment and find out. "For" loops are sometimes faster as they do not have the call overhead.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Direct Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!