LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate mean value of a matrix

Hi... I ve one matrix of order (m*n). I need to calculate the mean value of this matrix. How to do this?

 

let we consider the matrix as 4x4.(Row=Column=4) The resultant matrix i.e mean value matrix is 1x4(Row=4,Column=1). To read the row value simultaneously in order to calculte the mean value thro row.... ?  please help me out

 

Example:

 

Matrix A=1 2 3 4

               5 6 7 8

               1 3 5 7

               2 4 6 8. 

 

Mean value thro row would be:   10/4 [  (1+2+3+4)/4

                                                  26/4 [ (5+6+7+8) /4...Like this i ve to do..

 

Please help me out

 

0 Kudos
Message 1 of 5
(18,313 Views)

Feed matrix to a for loop, use Add array elements, divide it by N from loop. Out from loop is your answer.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(18,301 Views)
See the attached VI Snippet.
0 Kudos
Message 3 of 5
(18,295 Views)

Hi,

  See this attachment.....

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 5
(18,280 Views)
Thank You one and All for your reply. I got the answer.
0 Kudos
Message 5 of 5
(18,259 Views)