isosurf.m

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

M
36
字号
% ISOSURF Plotting of gaussian level lines%%    This script plots level lines at iso-likelihood levels%    for the models of class /i/ and class /e/.%[xx,yy] = meshgrid(0:10:2000, 1000:10:3000);range = linspace(-30, -12, 10);% First plot with full covariancezz1 = reshape( gausspdf([xx(:) yy(:)],mu_i,sigma_i) , size(xx) );zz2 = reshape( gausspdf([xx(:) yy(:)],mu_e,sigma_e) , size(xx) );subplot(2,1,1);[c,h] = contour3(xx,yy,log(zz1),range); hold on;[c,h] = contour3(xx,yy,log(zz2),range);colormap(jet);title('Iso-likelihood lines with DIFFERENT covariances');set(gca,'dataaspectratio',[1 1 1]);view(2);% Second plot with equal covariance, set to sigma_ezz1 = reshape( gausspdf([xx(:) yy(:)],mu_i,sigma_e) , size(xx) );subplot(2,1,2);[c,h] = contour3(xx,yy,log(zz1),range); hold on;[c,h] = contour3(xx,yy,log(zz2),range);colormap(jet);title('Iso-likelihood lines with EQUAL covariances');set(gca,'dataaspectratio',[1 1 1]);view(2);% Printing settingsset(gcf,'paperunits','cent','papertype','a4','paperpos',[0 0 21 29.7]);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?