LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting 2 1D arrays of x,y coordinates to a 2d array

Hi there

 

I'm trying to create a 2D array out of 2 1D arrays, where the 2 arrays represent the x and y coordinates of a set of points on a plane.

How should I do? I've been faffing around with all the available cluster and array functions, but to no avail.

 

Thank you in advance for your help!

 

Elisa

0 Kudos
Message 1 of 4
(5,950 Views)

Just use the Build Array function. The default setting will create a 2D from 1D inputs.

0 Kudos
Message 2 of 4
(5,944 Views)

If you are looking to graph this data, where the first array is the X values and the second is the Y, then I'd recommend using the "Index and Bundle Cluster" function under the Cluster palette.  Put both 1D arrays into it and the output will be an array of XY pairs.  This can then be used by wiring it to an XY Graph.

 

If you aren't looking to graph it and are just wanting to make 2 1D arrays into a 2D array then yes just use Build Array as Dennis mentioned.

Message 3 of 4
(5,938 Views)

Thank you Hooovahh, 

 

I think that should help. What I'm actually trying to do is displaying a set of points with a given location on the plane, and then FFT the so obtained 2D array...it's basically what you do to simulate a Low Energy Electron Diffraction pattern: the x and y position correspond to the atomic coordinates in the real space, and the FFT (which accepts arrays as an input) returns you the (ideal) diffraction pattern...

 

I'll try your solution, anyway.

Thank you,

                     Elisa

0 Kudos
Message 4 of 4
(5,926 Views)