Replace for loop with cell function to reduce run time

1 次查看(过去 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

回答(1 个)

Walter Roberson
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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by