MATLAB: How to calculate variance

columnmatrixsignalvariance

matrix of 1510 x 15? 15 is number of channels…so i wanted variance of every channel.

Best Answer

A= *your matrix*
V = var(A);
If A is a matrix whose columns are random variables and whose rows are observations, V is a row vector containing the variances corresponding to each column.