02-19-2013 02:24 PM - edited 02-19-2013 02:24 PM
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
02-19-2013 02:35 PM
Just use the Build Array function. The default setting will create a 2D from 1D inputs.
02-19-2013 02:39 PM - edited 02-19-2013 02:39 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-19-2013 03:28 PM
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