LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average/Standard Deviation/Max/Min of 2D Array

I am trying to read data from a spreadsheet file and calculate the average, standard deviation, max, and min values.

I can of course get the max and min using Array Max & Min.

I am having difficulty getting the average and standard deviation though; if anyone has ideas on how to do this I would appreciate it.

Thanks,
Ryan
Ryan

LV 7.1
0 Kudos
Message 1 of 5
(14,005 Views)
Which LabVIEW package do you have (Base, Full, or Professional)? If you have the base package then you will have to develop these functions on your own. If you have the full or professional packages then if you go to the Functions pallette and, under All Functions select Analyze, then select Mathematics, then select Probability and Statistics. You will find a function for Mean and for Standard Deviation on this pallette.
0 Kudos
Message 2 of 5
(14,000 Views)
The built-in Mean.vi from the advanced analysis palette does not do 2D arrays, so you would need ot reshape it to a 1D array.

Of course it would be also very simple to calculate these values using plain math. The attached VI (LabVIEW 7.0) shows both possibilities (Assuming Sample weighting for the variance). Enjoy!


(Everything should also work for 3-D and higher arrays).

Message Edited by altenbach on 06-07-2005 01:36 PM

Download All
Message 3 of 5
(14,002 Views)
Oops. I missed the fact that this was a 2D array. Nice catch altenbach.
0 Kudos
Message 4 of 5
(13,991 Views)
Hey guys, thanks a lot that was just what I needed...as simple as reshaping the array.....grrrrr

Thanks again for the help,
Ryan
Ryan

LV 7.1
0 Kudos
Message 5 of 5
(13,976 Views)