matlab实验五答案详解.docVIP

  • 388
  • 0
  • 约1.47千字
  • 约 3页
  • 2018-05-17 发布于河南
  • 举报
matlab实验五答案详解

实验5 函数文件 实验内容: 1.函数文件:function [y]=mat1(x) y=[exp(x),log(x),sin(x),cos(x)]; 函数调用:[y]=mat1(1+i) y = 1.4687 + 2.2874i 0.3466 + 0.7854i 1.2985 + 0.6350i 0.8337 - 0.9889i 2.函数文件:function [a,b,N,M]=shiyanwu2(m,n,t) A=[m*cos(t*pi/180),-m,-sin(t*pi/180),0;m*sin(t*pi/180),0,cos(t*pi/180),0;0,n,-sin(t*pi/180),0;0,0,-cos(t*pi/180),1]; B=[0,9.8*m,0,9.8*n]; C=inv(A)*B; a=C(1); b=C(2); N=C(3); M=C(4); 函数调用:m1=input(m1=); m2=input(m2=); theta=input(theta=); [a1,a2,N1,N2]=shiyanwu2(m1,m2,theta) m1=54 m2=65 theta=56 a1 = 9.4680 a2 = 2.4025 N1 = 188.3684 N2 = 742.3342 3、函数文件:functio

文档评论(0)

1亿VIP精品文档

相关文档