to speed up 'for' loop
显示 更早的评论
hello,
i have a loop with the following format:
for n = 1:length(x)
if ....
.....
elseif ....
.......
end
end
I suspect that it takes too long and my program is stuck. the length of 'x' currently 1200 cells and it might vary. How can I speed this up?
thanks,
5 个评论
Walter Roberson
2012-8-1
Please review the guide to tags and retag this; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
Oleg Komarov
2012-8-1
编辑:Oleg Komarov
2012-8-1
You haven't posted the relevant info.
What are you specifically doing inside the loop, what type of inputs, size you have, have you preallocated?
W/o this info is hard to say.
Michael Adelman
2012-8-2
Rick Rosson
2012-8-2
Please post the actual and complete code...
Michael Adelman
2012-8-3
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!