LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flipping the array

Can you guys tell me how to flip a 2d array?  So if i have a 100x100 array i want the 100x100th element to be placed at 1,100.Help please!!!!!!!!!!!!!!!!!!!!!
0 Kudos
Message 1 of 20
(4,061 Views)
You will need to better define "flip a 2D array" since there is no definition for that. Are you "flipping" along a diagonal? Or are you just flipping those two positions?
0 Kudos
Message 2 of 20
(4,055 Views)
This is where a picture is worth 2000 words.. 😉
Message 3 of 20
(4,044 Views)


@rpr wrote:
Can you guys tell me how to flip a 2d array?  So if i have a 100x100 array i want the 100x100th element to be placed at 1,100.Help please!!!!!!!!!!!!!!!!!!!!!


I'm sorry, but 100x100th element makes no sense.  Since a 100x100 array  has 10000 elements, how does placing the next element at position 1100 make any sense?
Jim

LV 2020
0 Kudos
Message 4 of 20
(4,032 Views)
Place a for loop and a Reverse 1D Array inside it. Wire the 2D array into the for loop and back out through the function and you will get a 2D array back. The auto-indexing will make the code work on each row of the array. If you want to work on the columns, you can use the Transpose 2D Array function.

___________________
Try to take over the world!
0 Kudos
Message 5 of 20
(4,031 Views)
Is this what you had in mind, by chance?

Message Edited by corys on 07-14-2008 10:24 AM
-Cory
Message 6 of 20
(4,029 Views)


corys wrote:

Is this what you had in mind, by chance?

It's certainly what I had in mind. Smiley Very Happy
 
By the way, Cory, you might find the Code Capture Tool useful.

___________________
Try to take over the world!
Message 7 of 20
(4,021 Views)
Great minds must think alike! And indeed, that does look like a very useful tool...thanks for pointing it out to me 😄
-Cory
0 Kudos
Message 8 of 20
(4,015 Views)
After seeing dozens of references and reccomendations for the CCT, I finally downloaded it.  Kudos and a hearty thank you to both Yair and Ton! I have MWSnap, and could not imagine how the CCT could make things any easier than that.  I was WRONG.
Jim

LV 2020
0 Kudos
Message 9 of 20
(3,993 Views)

We tried hard to make it extremely easy to install and to use on as many platforms and versions as possible. 

Well, on the GUI side, anyway. Only after we released I tried writing some new capturing code using the API and found out that it kind of sucked, because its error reporting wasn't very good and I assumed all kinds of stuff which was wrong when "designing" the API. Smiley Mad

But, all's well that ends well. I believe the current version on LAVA should have all the nice error reporting and flow required to use it.


___________________
Try to take over the world!
0 Kudos
Message 10 of 20
(3,966 Views)