05-24-2006 06:20 PM
05-24-2006 06:50 PM
05-24-2006 07:02 PM
That actually makes things easy.
You MIGHT be able to reshape your array, so that it really is a 1-D array (1800000 x 1), but that would cost you some memory usage. So forget that.
Consider what you want: Your index #0 goes 0, 100, 200, 300, ... 59900, and then 0, 100, 200, 300... 59900 again, while your index #1 goes 0,0,0,0,... 0, and then 1, 1, 1, 1, ... 1, etc., etc.
That is a perfect place to use the MODULUS function (implemented by the QUOTIENT and REMAINDER function in the ARITHMETIC palette).
1... Use a constant of 100 (your segment size). 2... Multiply "i" (your loop iteration number) by this constant. 3... Wire that result into the top input of the Q&R, and wire a 60000 (your dimension size) into the bottom. 4... Use the REMAINDER output as your starting index (it will be 0, 100, 200, 300, ... 59900, 0, 100, 200, 300, ... 59900...) 5... Use the QUOTIENT output as your second index (it will be 0, 1, 2, 3...)
You'll have to decide when you're done by how many elements you actually have.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-25-2006 07:16 AM
05-25-2006 08:05 AM
Thanks you all for the fast answers. I totaly forgot about the modulo function...Opps That is exactly what I needed. Thanks again.
Jocelyn