⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotgauss3.m

📁 Mathematical Methods by Moor n Stiling.
💻 M
字号:
% plot a Gauss surface plot
% Copyright 1999 by Todd K. Moon

mx = 0; my = 0;
sx2 = 1; sy2=1;
sx = sqrt(sx2);  sy = sqrt(sy2);
rho = .9;

 [X,Y] = meshgrid([-2:.1:2]);
fxy = 1/(2*pi*sx*sy*sqrt(1-rho^2))*...
	    exp(-2/(1-rho^2)*((X -mx).^2/sx2 + (Y-my).^2/sy2 - ...
		2*rho*(X-mx).*(Y-my)/(sx*sy)));
clf
subplot(2,2,1);
surf(X,Y,100*fxy+20); %,gradient(fxy))
hold on
contour(X,Y,fxy,10);
set(gca,'ZTick',[])
axis([-2 2 -2 2 0 40])

print -dps ../pictures/gauss21.ps
print -deps ../pictures/gauss21.eps
j = input('press enter')

rho = 0;
fxy2 = 1/(2*pi*sx*sy*sqrt(1-rho^2))*...
	    exp(-2/(1-rho^2)*((X -mx).^2/sx2 + (Y-my).^2/sy2 - ...
		2*rho*(X-mx).*(Y-my)/(sx*sy)));
clf
subplot(2,2,1);
surf(X,Y,100*fxy2+20)
hold on 
contour(X,Y,fxy2);
set(gca,'ZTick',[])
axis([-2 2 -2 2 0 40])
print -dps ../pictures/gauss22.ps
print -deps ../pictures/gauss22.eps

⌨️ 快捷键说明

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