Consider preallocating for speed
2 次查看(过去 30 天)
显示 更早的评论
Hello,
My lengthy program is littered with 'Consider preallocating for speed' suggestions for numerous variables.
What does a more experienced programmer do to circumvent this? Do I really need to allocate space at the start for every variable which this is suggested for?
Kind regards,
Tom
0 个评论
回答(1 个)
per isakson
2014-2-13
Litter the program with lines like
A = zeros(25000, 10000);
2 个评论
per isakson
2014-2-13
编辑:per isakson
2014-2-13
Dimension of left and right hand side must agree for existing variables(??)
Show a line, which causes this error.
The Mathworks server is choked?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!