LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete from Array Problem

I have 1D array containing 504000 elements that I want to remove segments of data from... 

 

3000 pixels + 360 dead pixels per line (3000,360,3000,360...)

 

150 lines total

 

later the data will be resized to a 3D array of 200 rows by 150 lines with 15 pages

 

Question is:

 

How do I process the array in place, removing segments of 360 elements, after

each 3000 elements... till the end of the array.

 

Thankyou.

0 Kudos
Message 1 of 2
(2,455 Views)
Make a for loop (or while loop), and give it a shift register. Wire the 1D
array to the left outside of the loop. In the loop, use a Delete From Array
to delete the desired elements. Use the "I" to determine the position of the
data to delete. Multiply I by 3000, and use a length of 360 wired to the
Delete From Array node. Wire the output of the Delete From Array node to the
right shift register.

Now, you can use a while loop for this, and in the while loop check if
Ix3000+360 is bigger then the array size. If so, stop the loop. You can also
use a Quotient & Remainder funtion, with the starting array size as X, and
3360 as Y. The floor is the number of thimes the for loop should be
executed.

Regards,

Wiebe.


0 Kudos
Message 2 of 2
(2,447 Views)