Matlab实验1 答案.doc_第1页
Matlab实验1 答案.doc_第2页
Matlab实验1 答案.doc_第3页
Matlab实验1 答案.doc_第4页
Matlab实验1 答案.doc_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Matlab 曲线绘图练习1. 绘出立方曲线。x=-2:0.05:2;y=x.3;plot(x,y)grid on 2. 立方抛物线。y=-2:0.05:2;x=y.3;plot(x,y)grid on 3. 高斯曲线。clear;x=-2:0.05:2;y=exp(-x.2);plot(x,y) 以参数方程表示的曲线:4. 奈尔抛物线clear;t=-2:0.05:2;x=t.3;y=t.2plot(x,y) y = Columns 1 through 14 4.0000 3.8025 3.6100 3.4225 3.2400 3.0625 2.8900 2.7225 2.5600 2.4025 2.2500 2.1025 1.9600 1.8225 Columns 15 through 28 1.6900 1.5625 1.4400 1.3225 1.2100 1.1025 1.0000 0.9025 0.8100 0.7225 0.6400 0.5625 0.4900 0.4225 Columns 29 through 42 0.3600 0.3025 0.2500 0.2025 0.1600 0.1225 0.0900 0.0625 0.0400 0.0225 0.0100 0.0025 0 0.0025 Columns 43 through 56 0.0100 0.0225 0.0400 0.0625 0.0900 0.1225 0.1600 0.2025 0.2500 0.3025 0.3600 0.4225 0.4900 0.5625 Columns 57 through 70 0.6400 0.7225 0.8100 0.9025 1.0000 1.1025 1.2100 1.3225 1.4400 1.5625 1.6900 1.8225 1.9600 2.1025 Columns 71 through 81 2.2500 2.4025 2.5600 2.7225 2.8900 3.0625 3.2400 3.4225 3.6100 3.8025 4.0000 5. 半立方抛物线clear;t=-2:0.05:2;x=t.2;y=t.3plot(x,y) y = Columns 1 through 14 -8.0000 -7.4149 -6.8590 -6.3316 -5.8320 -5.3594 -4.9130 -4.4921 -4.0960 -3.7239 -3.3750 -3.0486 -2.7440 -2.4604 Columns 15 through 28 -2.1970 -1.9531 -1.7280 -1.5209 -1.3310 -1.1576 -1.0000 -0.8574 -0.7290 -0.6141 -0.5120 -0.4219 -0.3430 -0.2746 Columns 29 through 42 -0.2160 -0.1664 -0.1250 -0.0911 -0.0640 -0.0429 -0.0270 -0.0156 -0.0080 -0.0034 -0.0010 -0.0001 0 0.0001 Columns 43 through 56 0.0010 0.0034 0.0080 0.0156 0.0270 0.0429 0.0640 0.0911 0.1250 0.1664 0.2160 0.2746 0.3430 0.4219 Columns 57 through 70 0.5120 0.6141 0.7290 0.8574 1.0000 1.1576 1.3310 1.5209 1.7280 1.9531 2.1970 2.4604 2.7440 3.0486 Columns 71 through 81 3.3750 3.7239 4.0960 4.4921 4.9130 5.3594 5.8320 6.3316 6.8590 7.4149 8.0000 6. 迪卡尔曲线clear;a=3;t=-2:0.05:2;x=3*a.*t./(1+t.2);y=3*a.*t.2./(1+t.2);plot(x,y);grid on 7. 蔓叶线clear;a=2;t=-10:0.05:10;x=a.*t.2./(1+t.2);y=a.*t.3./(1+t.2);plot(x,y);grid on 8. 摆线。clear;a=1;b=2;t=linspace(0,6*pi,100);x=a*(t-sin(t);y=b*(1-cos(t);plot(x,y);grid on 9. 内摆线(星形线)。clear;a=1;t=linspace(0,2*pi,100);x=a*cos(t).3;y=a*sin(t).3;plot(x,y)grid on 10. 圆的渐伸线(渐开线)。clear;a=1;t=linspace(0,6*pi,101);x=a*(cos(t)+t.*sin(t);y=a*(sin(t)-t.*cos(t);plot(x,y) 11. 空间螺线。clear;a=1;b=2;c=3;t=-2:0.05:2;x=a*cos(t);y=b*sin(t);z=c*tplot3(x,y,z) z = Columns 1 through 14 -6.0000 -5.8500 -5.7000 -5.5500 -5.4000 -5.2500 -5.1000 -4.9500 -4.8000 -4.6500 -4.5000 -4.3500 -4.2000 -4.0500 Columns 15 through 28 -3.9000 -3.7500 -3.6000 -3.4500 -3.3000 -3.1500 -3.0000 -2.8500 -2.7000 -2.5500 -2.4000 -2.2500 -2.1000 -1.9500 Columns 29 through 42 -1.8000 -1.6500 -1.5000 -1.3500 -1.2000 -1.0500 -0.9000 -0.7500 -0.6000 -0.4500 -0.3000 -0.1500 0 0.1500 Columns 43 through 56 0.3000 0.4500 0.6000 0.7500 0.9000 1.0500 1.2000 1.3500 1.5000 1.6500 1.8000 1.9500 2.1000 2.2500 Columns 57 through 70 2.4000 2.5500 2.7000 2.8500 3.0000 3.1500 3.3000 3.4500 3.6000 3.7500 3.9000 4.0500 4.2000 4.3500 Columns 71 through 81 4.5000 4.6500 4.8000 4.9500 5.1000 5.2500 5.4000 5.5500 5.7000 5.8500 6.0000 以极坐标方程表示的曲线12. 阿基米德线clear;close;a=2;t=-2:0.05:2;r=a*tx=r.*cos(t);y=r.*sin(t);plot(x,y) r = Columns 1 through 14 -4.0000 -3.9000 -3.8000 -3.7000 -3.6000 -3.5000 -3.4000 -3.3000 -3.2000 -3.1000 -3.0000 -2.9000 -2.8000 -2.7000 Columns 15 through 28 -2.6000 -2.5000 -2.4000 -2.3000 -2.2000 -2.1000 -2.0000 -1.9000 -1.8000 -1.7000 -1.6000 -1.5000 -1.4000 -1.3000 Columns 29 through 42 -1.2000 -1.1000 -1.0000 -0.9000 -0.8000 -0.7000 -0.6000 -0.5000 -0.4000 -0.3000 -0.2000 -0.1000 0 0.1000 Columns 43 through 56 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 Columns 57 through 70 1.6000 1.7000 1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 2.4000 2.5000 2.6000 2.7000 2.8000 2.9000 Columns 71 through 81 3.0000 3.1000 3.2000 3.3000 3.4000 3.5000 3.6000 3.7000 3.8000 3.9000 4.0000 13. 对数螺线clear;close;a=2;t=linspace(0,6*pi,10000);r=exp(a*t);x=r.*cos(t);y=r.*sin(t);plot(x,y) 14.双纽线clear;close;a=2;t=linspace(0,6*pi,10000);r=sqrt(a2.*cos(2*t);x=r.*cos(t);y=r.*sin(t);plot(x,y) Warning: Imaginary parts of complex X and/or Y arguments ignored 15. .双纽线 clear;close;a=1;t=linspace(0,6*pi,10000);r=sqrt(a2.*sin(2*t);x=r.*cos(t);y=r.*sin(t);plot(x,y) Warning: Imaginary parts of complex X and/or Y arguments ignored 16. 四叶玫瑰线 clear;close;a=2;t=linspace(0,6*pi,10000);r=a*sin(2*t);x=r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论