- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
MATLAB 实验六高层绘图
实验六 高层绘图操作
1. x=0:2*pi/101:2*pi;
y=(0.5+3.*sin(x)./(1+x.^2)).*cos(x);
plot(x,y);
2.
(1)
y1=x.^2
y2=cos(2*x)
y3=y1*y2
plot(x,y1,k:,x,y2,b--,x,y3);
(2)
x=(0:pi/100:2*pi);
y1=x.^2; y2=cos(2*x);
y3=y1.*y2;
subplot(3,1,1);
plot(x,y1);
title(y1);
subplot(3,1,2);
plot(x,y2);
title(y2);
subplot(3,1,3);
plot(x,y3);
title(y3);
(3)
x=(0:pi/100:2*pi);
y1=x.^2;
y2=cos(2*x);
y3=y1.*y2;
subplot(3,4,1);bar(x,y1,y);title(bar(x,y1,y)); subplot(3,4,2);stairs(x,y1,m);title(stairs(x,y1,m)); subplot(3,4,3);stem(x,y1,g);title(stem(x,y1,g));
subplot(3,4,4);fill(x,y1,c);title(fill(x,y1,c));
subplot(3,4,5);bar(x,y2,y);title(bar(x,y2,y)); subplot(3,4,6);stairs(x,y2,m);title(stairs(x,y2,m)); subplot(3,4,7);stem(x,y2,g);title(stem(x,y2,g));
subplot(3,4,8);fill(x,y2,c);title(fill(x,y2,c));
subplot(3,4,9);bar(x,y3,y);title(bar(x,y3,y)); subplot(3,4,10);stairs(x,y3,m);title(stairs(x,y3,m)); subplot(3,4,11);stem(x,y3,g);title(stem(x,y3,g)); subplot(3,4,12);fill(x,y3,c);title(fill(x,y3,c));
3. x=-5:0.1:5;
if x=0
y=(x+sqrt(pi))./(exp(2));
else y=1/2*(log(x+sqrt(1+x.^2)));
end
y
plot(x,y)
4. a=input(a=);
b=input(b=);
n=input(n=);
theta=0:0.01:2*pi;
rho=a*sin(b+n*theta);
polar(theta,rho,k)
a=1
b=1
n=1
5. x=-5:0.5:5;
y=0:1/3:10;
[x,y]=meshgrid(x,y);
z=cos(x).*cos(y).*exp(-(sqrt(x.^2+y.^2)/4));
subplot(2,2,1);
surf(x,y,z);
subplot(2,2,2);
contour3(x,y,z);
6. s=0:0.05:pi/2;
t=0:0.05:3*pi/2;
[s,t]=meshgrid(s,t);
[x,y,z]=peaks(30);
x=cos(s).*cos(t);
y=cos(s).*sin(t);
z=sin(s);
surf(x,y,z);shading flat;
文档评论(0)