preallocating an array changes the plot that it draws values from?
显示 更早的评论
I am trying to create a plot based off matrix values within a loop. Basically the matrix is extremely large (on the order of over millions of values) and is going to create a value based on if statements. Pre allocation has reduced the function run time from 560 seconds to about 3. The issue is that the plot that is drawing values from the matrix is coming out differently if I preallocate or not, even though other printed variable values from the matrix are coming out the same. Anyone have any idea why this might be occurring?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!