11-10-2010 02:25 PM
Hello Labview World:
Is there an easy way to convert 3 one-dimentional Arrays into a two-dimentional Array?
as shown below?
I've tried the reshape Array vi, but could not get it.
thank you much for your help.
\\carlos
Solved! Go to Solution.
11-10-2010 02:46 PM
For the posted example this seems to work.
11-10-2010 03:06 PM
Carlos,
Your original arrays are all different sizes. An array in LV must be rectangular: That is each row must be the same length as all other rows and each column must have the same length as all other columns. If your arrays are strings as in Matt W's example, the rest of the array will be filled with empty strings. For numeric the "extra" cells will have zeros.
Lynn
11-10-2010 03:08 PM
As stated above you have to deal with the arrays being different sizes.
11-10-2010 03:27 PM
Thank you Matt:
I'll sure give it a try...
Appreciate your help...
\\carlos
11-10-2010 03:30 PM
Thank you John:
Yes, my arrays are of different sizes.
The Arrays are strings.
thanks Johnsold
11-10-2010 03:35 PM
Hello Omar:
I've tried your solution and it works.
Now, I have to put it inside a while loop, because
I have repetitive Arrays of the same flavor.
thanks a lot...
\\carlos
11-10-2010 03:50 PM
That good but Matt had a "cleaner" solution. I never can remember how the array function react when the array are of different sizes.
I have been burned before of the output array being the size of the smallest array, losing data.
Where and how are your input data arrays coming from?
Where is your output array going?
I assume you have some data collection loop (reading data from a DAQ card, reading from a file etc). Then make this 3 array to 1 array in a sub VI and call it as you need it passing the 3 array and getting you output array.
Need a little more info on how you plan on using it.
Omar
11-10-2010 06:15 PM - edited 11-10-2010 06:16 PM