From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array

Solved!
Go to solution

I have numbers in the block diagram. 0 2 4 6 are the x coordinates, while 1 3 5 7 are the y coordinates. When I save the x And y coordinates are on the same row, but I want the X coordinates in the first row and the y coordinates in the second row. Is there a way to solve this problem???

0 Kudos
Message 1 of 6
(2,467 Views)
Solution
Accepted by Mark87

You need to make your data a 2D array

Omar
0 Kudos
Message 2 of 6
(2,451 Views)

Sorry Omar, can you post the jpeg image. I haven't the last version of LabVIEW.

Thanks for your reply.

0 Kudos
Message 3 of 6
(2,389 Views)

Hi Mark,

 

in your VI you create a 1D array of data - and then you wonder why they are saved as one row? Really?

 

You have to put those values in a 2D array. To do so create 1D arrays for both x and y values and then build a 2D array from those two 1D arrays…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,382 Views)

Here is the screenshot. But thank Omar_II, if you mean that his was useful.

 

1D to 2D.png

0 Kudos
Message 5 of 6
(2,366 Views)

Or you could simply do a reshape&transpose.

 

 

 

 

 

 

0 Kudos
Message 6 of 6
(2,355 Views)