LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use column in 2d array as page number for 3d array

You can simply sort them after the fact. I would suggest getting the OpenG Array library, as that has a VI for sorting 2D arrays. To still use the 3D array you would need to correctly determine the number of rows, which is the largest value from the available plots. For example, if plot 0 has 3 XY pairs, plot 1 has 5 XY pairs, and plot 2 has 4 XY pairs, then you would want 5 rows.This means counting the number of instances of "0", "1", "2", etc. in column 1 ahead of time so you know what value to feed to the Initialize Array function. 

 

Using the 1D array of clusters isn't all that complex:

 

 

0 Kudos
Message 11 of 12
(504 Views)

Here's my opinion.  I borrowed the cluster idea from smercurio_fc, but processed the result into a padded 3D array.

 

Note that this assumes that the lowest page number (from the first column in the original 2D array) is always zero.  (fwiw, ymmv, eieio)

Message Edited by jcarmody on 03-11-2009 11:57 AM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Download All
0 Kudos
Message 12 of 12
(499 Views)