meanf — weighted mean of a vector or a matrix
m=meanf(val,fre) m=meanf(val,fre,'r') or m=meanf(val,fre,1) m=meanf(val,fre,'c') or m=meanf(val,fre,2)
This function computes the mean of a vector or matrix x
.
For a vector or matrix x
, m=mn(x)
returns
in scalar m
the mean of all the entries of x
.
m=mn(x,'r')
(or, equivalently, m=mn(x,1)
)
returns in each entry of the row vector m
the mean
of each column of x
.
m=mn(x,'c')
(or, equivalently, m=mn(x,2)
)
returns in each entry of the column vector m
the
mean of each row of x
.