📄 example1_2.m
字号:
N1=10000;
mu=[730 1090];
sigma_3=[8000 0; 0 8000];
X3 = randn(N1,2)*sqrtm(sigma_3)+repmat(mu, N1, 1);
X=X3(1:1000,:);
N=size(X,1)
mu_1000=sum(X)/N
%mu_1000=mean(X)
sigma_1000=(X-repmat(mu_1000,N,1))'*(X-repmat(mu_1000,N,1))/(N-1)
%sigma_1000=cov(X)
% Comparison of the values:
e_mu=sqrt((mu_1000-mu)*(mu_1000-mu)')
% (This is the Euclidean distance between Mu_1000 and mu)
e_sigma=norm(sigma_1000-sigma_3)
% (This is the 2-norm of the difference between sigma_1000 and sigma_3)
%gausview(X3,mu,sigma_3, 'Sample X3');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -