The Variable appears to change size on every loop iteration
122 views (last 30 days)
Error: The Variable "temp_Outputs" appears to change size on every loop iteration
Question : I have No clue how to Preallocate it ?? Please help !!
per isakson on 19 Mar 2014
Edited: per isakson on 19 Mar 2014
This is not an error, it's a warning. It is inefficient to change size of a variable in a loop.
However, the if-statement makes it difficult to know the final size in advance, which is "needed" to preallocate.
IMO: don't care about the warning if the execution time is ok. It is possible to suppress it.