LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extracting columns from an 2d array

....transpose the array, then do autoindexing;with a FOR loop to obtain
your statistical parameters from each colum (each iteration will
process one column until you run out of columns ;)). Autoindexing the
results at the output boundary will give you arrays of size four, one
element for each column.
This keeps the diagram simple and it will automatically scale if you
need something similar with seven or even 1000 columns....

I have tried to do the above but being new to labview am not sure
about the construct. Can someone provide an example of the wire
diagram I can follow.

I want to take a 2d array and calculate the mean of each column and
create a 1D array of avaerages.

Being a newbie am a little lost.

Marco

0 Kudos
Message 1 of 5
(3,469 Views)
You should really reply in the thread where you found these instructions, but here's basically the code described.
 
 
Simple enough? 😄


Message Edited by altenbach on 07-31-2008 03:22 PM
0 Kudos
Message 2 of 5
(3,465 Views)
On Jul 31, 6:40 pm, altenbach <x...@no.email> wrote:
> You should really reply in the thread where you found these instructions, but here's basically the code described.
> &nbsp;
> <img src="http://forums.ni.com/attachments/ni/170/345719/1/averageColumns.PNG">
> &nbsp;
> Simple enough? :DMessage Edited by altenbach on 07-31-2008  03:22 PM
>
> averageColumns.PNG:http://forums.ni.com/attachments/ni/170/345719/1/averageColumns.PNG

Thanks for the reply, sorry for the bother, just thought it was an old
thread. I still find it odd why arrays get transposed. Can you suggest
any material which provides background on arrays and how the behave
when crossing boundaries.

Marco
0 Kudos
Message 3 of 5
(3,444 Views)
To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
0 Kudos
Message 4 of 5
(3,439 Views)
Autoindexig a 2D array at a loop boundary gets you one row with each iteration. Since you want one column, you need to transpose.
 
I would suggest to just play around with various arrays and test for yourself.
0 Kudos
Message 5 of 5
(3,435 Views)