10-10-2017 08:18 AM
I have an array of clusters each cluster has a timestamp (Xn) and an array of dbls (Yn,1; Yn,2;Yn,w...)
How can I change this arrangement into W clusters of Graphs with (Xn,Yn) arrays while not adding 0's to empty arrays:
Example:
Fortunatly, it can be assumed that the first value in the array will always go to the first graph, the second to the second ect.
Solved! Go to Solution.
10-10-2017 09:03 AM
10-10-2017 09:22 AM - edited 10-10-2017 09:24 AM
Hi ATE,
why do people always use this "Insert into Array" function when all they want to achieve is to append elements to an array? Why not use BuildArray instead?
This way you can eliminate the ArraySize function and the comparison before the case structure…
You can also determine the largest array size in your input data. Use this information to initialize the output array with the correct number of "plots"…
10-10-2017 10:04 AM
@GerdW wrote:
Hi ATE,
why do people always use this "Insert into Array" function when all they want to achieve is to append elements to an array? Why not use BuildArray instead?
This way you can eliminate the ArraySize function and the comparison before the case structure…
You can also determine the largest array size in your input data. Use this information to initialize the output array with the correct number of "plots"…
Hey Gerd,
I do use BuildArray to add the X and Y values, into "plot N." After that, I'm using the "Replace element in array" to override the previous array state.
Also, How would I go about determining the largest size in the input data?
10-10-2017 10:44 AM - edited 10-10-2017 11:27 AM
See if this works for you. No guarantees.. 😄
Seems to give the same result.... (but please test on other data)
Note: since the inner array cannot be larger than the outer input array, you could just use that, eliminating the first loop.