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 ExchangeMatrix Indexing についてさらに検索

質問済み:

2018 年 9 月 13 日

コメント済み:

2018 年 9 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by