example1_2.asv

来自「一本关于dsp的原著教材」· ASV 代码 · 共 17 行

ASV
17
字号
N1=10000;
mu=[730 1090];
sigma_3=[8000 8400; 8400  18500];
X3 = randn(N1,2)*sqrtm(sigma_3)+repmat(mu, N1, 1);
%X=X3(1:1000,:);
N=size(X3,1)
mu_1=[730 1090];
sigma_1=[8000 0;0 8000];
logLike1=0;
for i = 1:N;
    logLike1=logLike1+(X3(i,:)-mu_1*inv(sigma_1)*(X3(i,:)-mu_1))
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 + =
减小字号Ctrl + -
显示快捷键?