06.08.2013 Views

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

t=0:pi/20:2*pi;x=R*sin(t);y=R*cos(t);<br />

plot(x,y,'b:'),grid<br />

hold on<br />

plot(rrr(1),'.','MarkerSize',50,'Color','r')<br />

plot(rrr([2,3]),'o','MarkerSize',15,'Color','b')<br />

axis([-3,3,-3,3]),axis square<br />

hold off<br />

1.3.4 计算结果的图形表示<br />

3<br />

2<br />

1<br />

0<br />

-1<br />

-2<br />

-3<br />

-3 -2 -1 0 1 2 3<br />

t<br />

−<br />

图 1.3-2<br />

3<br />

【例 1.3.4-1】画出衰减振荡曲线 y = e sin 3t<br />

及其它的包络线 y0<br />

[ 0,<br />

4π<br />

] 。(图 1.3-3)<br />

t=0:pi/50:4*pi;<br />

y0=exp(-t/3);<br />

y=exp(-t/3).*sin(3*t);<br />

plot(t,y,'-r',t,y0,':b',t,-y0,':b')<br />

grid<br />

= e 3 。t 的取值范围是<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-0.4<br />

-0.6<br />

-0.8<br />

-1<br />

0 2 4 6 8 10 12 14<br />

图 1.3-3<br />

2 2<br />

sin( x + y )<br />

【例 1.3.4-2】画出 z = 所表示的三维曲面(图 1.3-4)。 x, y 的取值范围是<br />

2 2<br />

x + y<br />

[− 8,<br />

8]<br />

。<br />

clear;x=-8:0.5:8;<br />

y=x';<br />

X=ones(size(y))*x;<br />

Y=y*ones(size(x));<br />

R=sqrt(X.^2+Y.^2)+eps; %<br />

Z=sin(R)./R; %<br />

surf(X,Y,Z); %<br />

t<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!