Not enough memory to complete this operation, a 30M data points waveform – Page 2

@yeah wrote:
Question 1 : which is the best way to create an array with elements from 0 to 20000000, currently I’m using FOR loop. 

What’s the datatype you want and why do you even need that. Such an array can be described with a few words, no need to waste hundreds of megabytes.


@yeah wrote:
Question 2:which is the best way to transfer a DBL data array to string array and build 2D array according to the DBL data array quantity. currently I’m using “number to fractional string” to transfer the DBL Array, and then, still using a For loop to buid the 2D array. Is there best method to save memory useage?

How should the string array depend on the data? Is each element a formatted number (Wasteful and lossy) or just a DBL cast to string? A formatted string is useful when writing to a simple file that needs to be readable by humans and other software. Having that kind of data in memory is pointless, because you cannot really do math on strings. If this is for a table indicator, you can format the visible subset, which is a tiny fraction. What’s the purpose and shape of the 2D array and how are you using a FOR loop to create it.


We clearly need much better specifications on what you are trying to do. We don’t want to know how you are trying to do it, that might be completely misguided!


Read more here: Source link