MATLAB程序设计刘卫国实验六

上传人:鲁** 文档编号:497980845 上传时间:2023-10-12 格式:DOC 页数:6 大小:284KB
返回 下载 相关 举报
MATLAB程序设计刘卫国实验六_第1页
第1页 / 共6页
MATLAB程序设计刘卫国实验六_第2页
第2页 / 共6页
MATLAB程序设计刘卫国实验六_第3页
第3页 / 共6页
MATLAB程序设计刘卫国实验六_第4页
第4页 / 共6页
MATLAB程序设计刘卫国实验六_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《MATLAB程序设计刘卫国实验六》由会员分享,可在线阅读,更多相关《MATLAB程序设计刘卫国实验六(6页珍藏版)》请在金锄头文库上搜索。

1、1题x=linspace(0,2*pi,101);y=(0.5+(3*sin(x)/(1+x.2)*cos(x);plot(x,y)2题x=linspace(0,2*pi,100);y1=x.2;y2=cos(2*x);y3=y1.*y2;subplot(2,2,1);plot(x,y1,g,x,y2,r,x,y3,c)title(第(1)小题不同颜色绘图)subplot(2,2,2);plot(x,y1);title(第(2)小题( 子图1))subplot(2,2,3);plot(x,y2);title((子图2))subplot(2,2,4);plot(x,y3);title((子图3)

2、)figure(2)subplot(4,4,1);bar(x,y1);title(y1条形图);subplot(3,4,2);stem(x,y1);title(y1杆图);subplot(3,4,3);stairs(x,y1);title(y1阶梯图);subplot(3,4,4);fill(x,y1,g);title(y1填充图);subplot(3,4,5);bar(x,y2);title(y2条形图);subplot(3,4,6);stem(x,y2);title(y2杆图);subplot(3,4,7);stairs(x,y2);title(y2阶梯图);subplot(3,4,8);

3、fill(x,y2,g);title(y2填充图);subplot(3,4,9);bar(x,y3);title(y3条形图);subplot(3,4,10);stem(x,y3);title(y3杆图);subplot(3,4,11);stairs(x,y3);title(y3阶梯图);subplot(3,4,12);fill(x,y3,g);title(y3填充图);3题x1=linspace(-5,0,50);x2=linspace(0,5,50);y1=(x1+sqrt(pi)/exp(2);y2=1/2*log(x2+sqrt(1+x2.2);plotyy(x1,y1,x2,y2)g

4、rid on4题theta=0:0.01:2*pi;c=1;for(a=4:5) for(b=2:3) for(n=3:4) rho=a*sin(b+n*theta); subplot(2,4,c) polar(theta,rho,g) c=c+1; end endend由图片分析得:a影响曲线的半径,b影响曲线的角度,n影响曲线的周期5题x=linspace(-5,5,31);y=linspace(0,10,21);x,y=meshgrid(x,y)a=sqrt(x.2+y.2);z=cos(x).*cos(y).*exp(-a/4);subplot(1,2,1);surf(x,y,z);shading interpview(-27.5,30)subplot(1,2,2);contour3(x,y,z,50,g)6题s=linspace(0,pi/2,100);t=linspace(0,pi*3/2,100);s,t=meshgrid(s,t)x=cos(s).*cos(t);y=cos(s).*sin(t);z=sin(s);surf(x,y,z)shading interp;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 资格认证/考试 > 自考

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号