LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array manipulation

I would like to manipulate and array like this.

 

12 42

22 32

13 43

23 33

 

to

 

12 42 13 43

22 32 23 33

 

How would I go about doing this?

0 Kudos
Message 1 of 9
(3,412 Views)

Use Transpose 2D Array:

 

untitled.JPG

 

vi.png

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 2 of 9
(3,407 Views)

It's not actually a transpose that the OP is looking for.

 

Need more information about what operation the OP is trying to do and whether it is scalable.

 

It looks like the OP wants to do a split and then reassemble.

 

Array manip snippet.png

 

But this is almost certainly not what the OP really needs.

0 Kudos
Message 3 of 9
(3,400 Views)

!1.png

Reshape transposing rows and columns  

 

(Note: I bet the array buffer allocations aren't necessarilly real)

!1-1.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 9
(3,391 Views)

Jeff, all you did was a Transpose 2D Array.  Look at the example closer.

 

Here's what I came up with really quick.  It is scalable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(3,386 Views)

thanks. What is that double orange block on the output of the for loop?

0 Kudos
Message 6 of 9
(3,364 Views)

I told the FOR loop's output terminals to "Concatinate".  Right click on the terminal and go to Tunnel Mode->Concatinating.  That was introduced in 2012, so if you have anything older, we will need to have some fun with shift registers and Build Array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(3,357 Views)

@crossrulz wrote:

Jeff, all you did was a Transpose 2D Array.  Look at the example closer.

 

 

Well not exactly but, is see after closer examination its even rows appended in order on row 0 and odd rows to row 1 from the OP's post.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 9
(3,347 Views)

*Edited,cause is not working as expected*

0 Kudos
Message 9 of 9
(3,320 Views)