Hi,
I have an 1d array of 0,1,2,3,4,5,6,7,8 using reshape array I can make it:
0 1 2
3 4 5
6 7 8
But I want the even rows to be arranged in the reverse order i.e
0 1 2
5 4 3
6 7 8
Can anybody tell how can I do that.
kind regards,
Zoton
Solved! Go to Solution.
Hi Zoton,
But I want the even rows to be arranged in the reverse order
Use a loop on the reshaped array and apply Reverse1DArray on each 2nd row…
(Be careful what you define as "even row" as LabVIEW starts to count array indices with zero!)
Hi Gerdw,
Thank you very much for your reply. I am new to this and I made the attached vi. Even though I am not sure if my approach is efficient or not but if I run the vi I cant build a new array with reversed odd index elements. After reading some related posts it seems like I need to use use the shift register as the previous rows gets replaced by zero. So my queries are:
1. How can I build the new array
2. How can i Initiate array for different data set size
Thanks again.
Kind regards,
Zoton
I used replace array and shift register. Seems like its working. Is there any better way to do it?
Dear Paus,
This is awesome. More neat than the one of mine. Kudos.