Well, I assume you have a loop within a loop? You iterate 93000 times for every row in your 256000 array? 23billion iterations, yes, this would be slow. Even on my 2.2GHz Pentium4 it takes 2-3 minutes. The proper way is to just iterate once through your data and determine where to plug it into your blank array. Here is one approach (there are others of course) that I came up with that might help you. I don't know what your criteria is for determining good data and where it belongs, this is up to you. This method took about 3secs.
<http://lavausergroup.org/labviewimages/reconstruct_data.gif> Michael Aivaliotis http://forums.lavausergroup.org http://mmwis.com <snip> > what I do is: -initialise > a SGL 2D array of 256,000 rows x 4 columns, where the first > column is the laser scan index (0 for the first 512 rows, 1 > for the next 512 rows and so on), and the remaining 3 columns > are NaN's for the x,y,z coordinates of the points. > - then, inside a FOR loop, 93,000 times I replace one row at > a time with the appropriate coordinates as returned by the > scanner. I have to do it one row at a time as the points are > missing in totally random order. Of course I use a shift > register (or feed-back node to be trendy) and the Replace > Array Subset function. It's all very nice, except it takes 20 > minutes (Pentium III 800MHz Win2K LV7.1)! I then replace the > FOR loop with a formula node and inside that a workmate of > mine writes the corresponding C code to do exactly the same > job. Now it takes 10 seconds! Is LabVIEW really worthwhile, > or do we all need to go back to basics and learn C?
