LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change 1D array of data from one row to one column

Solved!
Go to solution

Hi all,

 

This may be a really simple questions, but im trying to take two 1D arrays of data, put them in to one array and have that array be 1 column so it looks neat in  a table.

 

THank you



-Matt
0 Kudos
Message 1 of 9
(9,956 Views)

This should be pretty easy to do. Simply run the two arrays into a "Build array" function, then right click the "Build Array" function and make sure there is a Check next to "Concatenate Arrays".

 

N.B. To put two arrays into a "Build array function" simply place the function and then drag to bottom edge down so that you have 2 wiring points.

Message 2 of 9
(9,942 Views)

MY apolagy, I wrote this backwards haha.  I want the final result to be one row, by however many columns it is.



-Matt
0 Kudos
Message 3 of 9
(9,939 Views)

A 1-D array doesn't have any direction.  It can be either a single row, or a single column.  It is all in whatever direction you decide to drag the control or indicator when you show multiple elements.

Message 4 of 9
(9,936 Views)
Solution
Accepted by topic author Wolleee

You probably need to transpose the array, since the build array function will append as rows. This will give you colums as you wanted:

 

transpose.png

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 5 of 9
(9,935 Views)

I re-read your first question. You need to concatenate your two arrays into a 1-D array, then build this (somewhat artificially) into a 2-D array, and then transpose to get your row (the default) into a column. See this snippet:

 

format for table column.png

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 6 of 9
(9,920 Views)

None of that is correct.

 

A 1-D array is just that.  A single dimension.  It can either be horizontal (elements are columns), or vertical (elements are rows).  Whichever way you want to display it.

 

If you actually want a 2-D array, then say so.

0 Kudos
Message 7 of 9
(9,903 Views)

HI RavensFan: It was specified that this data would be displayed in a table, so it must be 2-D. Otherwise, you are right, you can stretch a 1-D array in a horizonal or vertical direction. 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 8 of 9
(9,893 Views)

You're right.  I missed the word "table" in the original message.

0 Kudos
Message 9 of 9
(9,890 Views)