www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ComputeCovarianceOfMatrixExample.m
%% Covariance of Matrix % Create a 3-by-4 matrix and compute its covariance. % Copyright 2015 The MathWorks, Inc. A = [5 0 3 7; 1 -5 7 3; 4 9 8 10]; C = cov(A) %% % Since the number of columns of |A| is 4, the result is a 4-by-4 matrix.