




已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第一题 定积分 极限 微分 function y f1 F 1 while F 0 syms x y z F input 请输入表达式 变量为x y z 退出 0 if F 0 Sel input 请选择要进行的计算 1 微分 2 极限 3 定积分 其他 返回 switch Sel case 1 Var input 请输入进行微分的变量 N input 请输入阶数 disp 结果为 diff F Var N case 2 Var input 请输入进行极限的变量 Val input 请输入极限要趋近的值 disp 结果为 limit F Var Val case 3 Var input 请输入积分变量 Val 1 input 请输入积分下限 Val 2 input 请输入积分上限 disp 结果为 int F Var Val 1 Val 2 end end F input 0 退出 其他 继续 end 第二题 矩阵的运算 function y f2 syms result while 1 disp disp 1 Add disp 2 Sub disp 3 Multi disp 4 Divide disp 0 Exit ch input Choose an item to continue if ch 0 return end M1 input Enter the first Matrix M2 input Enter the second Matrix switch ch case 1 result M1 M2 case 2 result M1 M2 case 3 result M1 M2 case 4 result M1 M2 end disp The result is disp result end End function 第三题 矩阵的操作 function y f3 while 1 disp disp 1 转置 disp 2 求秩 disp 3 求逆 disp 4 行列式 disp 0 Exit ch input Choose an item to continue if ch 0 return end M input Enter the Matrix switch ch case 1 result M case 2 result rank M case 3 result inv M case 4 result det M end disp The transform result is disp result end End function end end end 第四题 向量的判定 function y f4 vec 1 vec 2 dem 1 vec 1 input 第一个向量 vec 2 input 第二个向量 Sel 2 input 选择 1 判断两向量是否共线 2 判断三向量是否共面 if Sel 2 1 A vec 1 vec 2 if rank A 1 disp 两向量共线 else disp 两向量不共线 end else if Sel 2 2 vec 3 input 请输入第三个向量 dem 3 length vec 3 if dem 3 dem 1 if cro vec 1 vec 2 vec 3 0 disp 三向量共面 else disp 三向量不共面 end else disp 输入向量维数不一致 end end end 第五题 向量的长度 方向角的计算 点积 叉积 混合积及投影的计算 function y f5 n 1 while n 0 vec 1 input 请输入第一个向量 dem 1 length vec 1 Sel input 请选择 1 计算向量的方向角 长度 2 计算向量其他运算 其他 返回 if Sel 2 vec 2 input 请输入第二个向量 dem 2 length vec 2 if dem 1 dem 2 Sel 1 input 请选择运算 1 点积 2 向量积 三维 3 投影 三维 4 混合积 三维 5 判断共线 共面 switch Sel 1 case 5 JUDGE vec 1 vec 2 dem 1 case 1 vec 1 vec 2 case 2 PAN vec 1 vec 2 case 3 vec 1 vec 2 sqrt vec 2 vec 2 case 4 vec 3 input 请输入第三个向量 三维 dem 3 length vec 3 if dem 3 dem 1 A PAN vec 1 vec 2 vec 3 else disp 维数不一致 end end else disp 输入错误 end else if Sel 1 disp 模为 Mol sqrt vec 1 vec 1 A eye dem 1 m 1 while m dem 1 1 acos A m vec 1 sqrt A m A m Mol 180 pi m m 1 end else n 0 end end Sel input 继续计算向量的长度 方向角的计算 向量的点积 叉积 混合积及投影 1 退出 2 if Sel 2 n 0 end end 第六题 点到直线 平面的距离的计算 function y f6 n 1 while n 0 Point input 请输入一个三维点坐标向量 Sel input 请选择 1 点到直线的距离 2 点到面的距离 switch Sel case 1 LinVec input 请输入直线方程的方向向量 三维 LinPot input 请输入直线方程所经过的点 三维 if length LinVec length LinPot b 20 c 10 x y meshgrid 2 0 1 2 2 0 1 2 xa x 2 a 2 yb y 2 b 2 xyz ones size x xa yb c 2 z xyz 0 5 mesh x y z 第八题 双曲抛物面 function pic2 a 5 b 5 x y meshgrid 2 0 1 2 2 0 1 2 xa x 2 a 2 yb y 2 b 2 z yb xa mesh x y z 第九题 椭圆抛物面 function y pic3 a 2 b 2 x y meshgrid 2 0 1 2 2 0 1 2 xa x 2 a 2 yb y 2 b 2 z xa yb mesh x y z 第十题 单页双曲面 function y pic4 theta 0 pi 20 2 pi rho 1 0 05 3 theta rho meshgrid theta rho r sqrt rho 2 1 x y z pol2cart theta rho r figure 1 surf x y z hold on z z surf x y z axis off 第十一题 双叶双曲面 function k pic5 t1 2 pi 0 05 2 pi t2 1 pi 0 05 1 pi t1 t2 meshgrid 2 pi 0 05 2 pi 1 pi 0 05 1 pi z 0 2 sqrt sin t2 sin t2 1 h1 mesh 2 cos t1 sin t2 sin t1 sin t2 z hold on h2 mesh 2 cos t1 sin t2 sin t1 sin t2 z 第十二题 椭圆锥面 function k tupian4 x y x 3 0 01 3 y 2 0 01 2 x y meshgrid 3 0 01 3 2 0 01 2 z sqrt x 3 2 y 2 2 mesh x y z hold on mesh x y z 第十三题 常见二维图形 theta 0 0 1 2 pi figure 1 rho 2 theta polar theta rho title r at t 2 pi 0 1 2 pi figure 1 x 2 t sin t y 2 1 cos t plot x y g xlabel x ylabel y title 摆线 theta 0 0 1 10 pi figure 1 rho sqrt 4 sin 2 theta polar theta rho g hold on rho rho polar theta rho g legend r 2 a 2sin2t 2 hold on rho sqrt 4 cos 2 theta polar theta rho r hold on rho rho polar theta rho r legend r 2 a 2cos2t 2 theta 0 0 1 4 pi figure 1 rho exp 0 2 theta polar theta rho title r exp at x 5 0 1 5 y 1 sqrt 2 pi exp x 2 2 figure 1 plot x y g xlabel x ylabel y title 概率曲线 t 0 0 1 2 pi figure 1 x 2 cos t 3 y 2 sin t 3 plot x y g xlabel x ylabel y title x 2 3 y 2 3 a 2 3 theta 0 0 1 2 pi figure 1 rho 2 cos 3 theta polar theta rho g legend r asin3t 4 hold on rho 2 sin 3 theta polar theta rho r legend r acos3t theta 0 0 1 2 pi figure 1 rho 2 cos 2 theta polar theta rho g legend r acos2t 4 t 0 0 1 2 pi figure 1 x 2 cos t y 2 sin t plot x y g xlabel x ylabel y title x 2 a 2 y 2 b 2 1 theta 0 0 1 2 pi figure 1 rho 2 1 cos theta polar theta rho title r a 1 cos t x 1 1 20 1 figure 1 subplot 2 2 1 y asin x plot x y g title asin x axis 1 1 2 2 subplot 2 2 2 y acos x plot x y g title acos x axis 1 1 0 4 subplot 2 2 3 y atan x plot x y g title atan x hold on y y pi plot x y hold on y y 2 pi plot x y axis 1 5 1 5 4 4 subplot 2 2 4 y atan x plot x y g title acot x x x y y pi 2 plot x y hold on y y pi plot x y hold on y y 2 pi plot x y axis 1 5 1 5 pi 2 pi x 5 0 1 5 y 8 2 3 x 2 4 2 2 figure 1 plot x y g hold on x 2 0 1 2 y sqrt 4 x 2 2 plot x y r hold on y sqrt 4 x 2 2 plot x y r xlabel x ylabel y title y 8a 3 x 2 4a 2 y 5 0 1 5 figure 1 x 2 1 y 2 0 5 plot x y g hold on x x plot x y g xlabel x ylabel y title x 2 a 2 y 2 b 2 1 x 2 0 1 2 figure 1 subplot 2 4 1 y x 2 plot x y g title x 2 subplot 2 4 2 y x 3 plot x y g title x 3 subplot 2 4 3 y x 1 plot x y g title 1 x subplot 2 4 4 x 0 0 1 2 y x 0 5 plot x y g title x 1 2 subplot 2 4 5 x 2 0 1 2 y x 2 1 3 plot x y g title x 2 3 subplot 2 4 6 x 0 0 1 2 y x 1 3 plot x y g hold on x x y y plot x y g title x 1 3 subplot 2 4 7 x 0 0 1 2 y x 1 5 plot x y g hold on y y plot x y g title x 1 3 x 4 pi pi 20 4 pi figure 1 subplot 2 2 1 y sin x plot x y g title sin x subplot 2 2 2 y cos x plot x y g title cos x subplot 2 2 3 x pi 2 0 0001 pi 20 pi 2 0 0001 y tan x plot x y g
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中风脑梗死急性期护理
- 企业社保缴纳合规风险防范措施
- 九寨沟诺日朗瀑布讲解
- 高职院校机械实训教学大纲
- 银行业务风险控制及合规管理方案
- 商业银行风险管理内控制度详解
- 汽车销售客户信用管理流程
- 危重症患者的护理应对
- 跨境电商物流方案设计与优化
- 多发性周围神经病护理业务查房
- 2025河南水投资源开发管理集团招聘11人笔试参考题库附带答案详解
- 颅内占位疑难病例讨论
- 视网膜出血的治疗及护理
- 保险学考试题(附答案)
- 心理学基础(第2版) 课件 第1章 概述
- 2025至2030银行人工智能行业市场发展前景及发展趋势与投资机会报告
- 职业少儿创意美术课件
- 国企纪法教育实施路径
- 职业人群心理健康知识讲座:减压赋能与心理调适
- 工模具点检管理制度
- 临床科室科研管理制度
评论
0/150
提交评论