matlab实验作业.docx

上传人:b****6 文档编号:12141737 上传时间:2023-06-04 格式:DOCX 页数:19 大小:176.31KB
下载 相关 举报
matlab实验作业.docx_第1页
第1页 / 共19页
matlab实验作业.docx_第2页
第2页 / 共19页
matlab实验作业.docx_第3页
第3页 / 共19页
matlab实验作业.docx_第4页
第4页 / 共19页
matlab实验作业.docx_第5页
第5页 / 共19页
matlab实验作业.docx_第6页
第6页 / 共19页
matlab实验作业.docx_第7页
第7页 / 共19页
matlab实验作业.docx_第8页
第8页 / 共19页
matlab实验作业.docx_第9页
第9页 / 共19页
matlab实验作业.docx_第10页
第10页 / 共19页
matlab实验作业.docx_第11页
第11页 / 共19页
matlab实验作业.docx_第12页
第12页 / 共19页
matlab实验作业.docx_第13页
第13页 / 共19页
matlab实验作业.docx_第14页
第14页 / 共19页
matlab实验作业.docx_第15页
第15页 / 共19页
matlab实验作业.docx_第16页
第16页 / 共19页
matlab实验作业.docx_第17页
第17页 / 共19页
matlab实验作业.docx_第18页
第18页 / 共19页
matlab实验作业.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

matlab实验作业.docx

《matlab实验作业.docx》由会员分享,可在线阅读,更多相关《matlab实验作业.docx(19页珍藏版)》请在冰点文库上搜索。

matlab实验作业.docx

matlab实验作业

第二题:

>>A=[1,2,3,4;4,3,2,1;2,3,4,1;3,2,4,1]

A=

1234

4321

2341

3241

>>B=[1+4j,2+3j,3+2j,4+1j;4+1j,3+2j,2+3j,1+4j;2+3j,3+2j,4+1j,1+4j;3+2j,2+3j,4+1j,1+4j]

B=

1.0000+4.0000i2.0000+3.0000i3.0000+2.0000i4.0000+1.0000i

4.0000+1.0000i3.0000+2.0000i2.0000+3.0000i1.0000+4.0000i

2.0000+3.0000i3.0000+2.0000i4.0000+1.0000i1.0000+4.0000i

3.0000+2.0000i2.0000+3.0000i4.0000+1.0000i1.0000+4.0000i

>>A(5,6)=5

A=

123400

432100

234100

324100

000005

第三题

>>A=magic(8)

A=

642361606757

955541213515016

1747462021434224

4026273736303133

3234352928383925

4123224445191848

4915145253111056

858595462631

>>B=A(:

2:

2:

end)

B=

261657

55125116

47204324

26373033

34293825

23441948

15521156

585621

第四题

>>s=sum(2.^(0:

63))

s=

1.8447e+019

>>s=sum(sym

(2).^(0:

63))

s=

184********709551615

第五题

(1)x=[-1:

0.01:

1];

y=sin(1./x);plot(x,y)

(2)x=[-pi:

0.00001:

pi];

y=sin(tan(x))-tan(sin(x));

plot(x,y)

第六题

xx=[-2:

0.1:

-1.2,-1.1:

0.01:

-0.7,-0.7:

0.1:

0.7,0.8:

0.01:

1.2,1.3:

0.1:

2];

[x,y]=meshgrid(xx,yy);

z=1./sqrt((1+x).^2+y.^2)+1./sqrt((1-x).^2+y.^2);

subplot(224),surf(x,y,z),shadingflat

subplot(223),surf(x,y,z),shadingflat,view(0,90);title('俯视图');

subplot(222),surf(x,y,z),shadingflat,view(90,0);title('侧视图');

subplot(221),surf(x,y,z),shadingflat,view(0,0);title('正视图')

第7题

(1)

>>symsxy;y=(3.^x+9.^x).^(1./x);L=limit(y,x,inf)

L=

9

(2)

symsxy;f=x.*y./(sqrt(x.*y+1)-1);L=limit(limit(f,x,0),y,0)

L=

2

(3)

symsxy;f=(1-cos(x.^2+y.^2))./((x.^2+y.^2).*exp(x.^2+y.^2));L=limit(limit(f,x,0),y,0)

L=

0

第8题

(1)

symsxyt;x=log(cos(t));y=cos(t)-t.*sin(t);a=diff(x,t);b=diff(y,t);f=b./a

f=

(cos(t)*(2*sin(t)+t*cos(t)))/sin(t)

(2)

symsxyt;

x=log(cos(t));y=cos(t)-t.*sin(t);a=diff(x,t);b=diff(y,t);f=b./a;f1=diff(f,t);f2=simple(f1./a);

c=subs(f2,t,pi./3)

c=

1.5387

第9题

symsxytf1f2f3f4f5;f1=exp(-t.^2);f2=int(f1,t,0,x.*y);f3=diff(diff(f2,x),x);f4=diff(diff(f2,x),y);f5=diff(diff(f2,y),y);...

f6=simple((f3.*x)./y-2.*f4+f5)

f6=

-2*exp(-x^2*y^2)*(x^3*y-x^2*y^2+1)

第10题

(1)

symsn;f=limit(symsum(1./((2.*n).^2-1),n),n,inf)

f=

0

(2)

symsnf;f=symsum(1./(n.^2+pi.*n),n);L=simple(limit(f.*n,n,inf))

L=-1/(2*pi)-(pi-1/2)/pi=-1

第11题

(1)

symsxyta;x=a.*(cos(t)+t.*sin(t));

y=a.*(sin(t)-t.*cos(t));

I=simple(int((x.^2+y.^2)*sqrt(diff(x,t).^2+diff(y,t).^2),t,0,2*pi))

I=

pi^2*(4*pi^2+2)*(a^2)^(3/2)

(2)

symsabct;

symsabcpositive;

x=(c.*cos(t))./a;y=(c.*sin(t))./b;F=[(y.*x.^3+exp(y)),(x.*y.^3+x.*exp(y)-2*y)];ds=[diff(x,t);

diff(y,t)];I=simple(int(F*ds,t,pi,0))

I=

(2*c)/a-(4*c^5)/(15*a*b^4)

第12题

symsabcdey;A=[a.^4,a.^3,a.^2,a,1;b.^4,b.^3,b.^2,b,1;c.^4,c.^3,c.^2,c,1;d.^4,d.^3,d.^2,d,1;e.^4,e.^3,e.^2,e,1];

y=simple(det(A))

y=

(a-b)*(a-c)*(a-d)*(b-c)*(a-e)*(b-d)*(b-e)*(c-d)*(c-e)*(d-e)

第13题

A=[-2,0.5,-0.5,0.5;0,-1.5,0.5,-0.5;2,0.5,-4.5,0.5;2,1,-2,-2];J=jordan(A)

J=

-4000

0-210

00-21

000-2

第14题

A=[3-6-405;142-24;-63-673;-13100-110;04034];...

B=[3-21;-2-92;-2-19];C=[2-11;-4-1-2;-56-1;-644;6-63];X=lyap(A,B,C)

X=

4.056914.5128-1.5653

-0.0356-25.07432.7408

-9.4886-25.93234.4177

-2.6969-21.64502.8851

-7.7229-31.91003.7634

第15题

(1)

symst;A=[-4.5,0,0.5,-1.5;-0.5,-4,0.5,-0.5;1.5,1,-2.5,1.5;0,-1,-1,-3];B=simple(expm(A*t))

B=

[(exp(-5*t)*(exp(2*t)-t*exp(2*t)+t^2*exp(2*t)+1))/2,(exp(-5*t)*(2*t*exp(2*t)-exp(2*t)+1))/2,(t*exp(-3*t)*(t+1))/2,-(exp(-5*t)*(exp(2*t)+t*exp(2*t)-t^2*exp(2*t)-1))/2]

[(exp(-5*t)*(t*exp(2*t)-exp(2*t)+1))/2,(exp(-5*t)*(exp(2*t)+1))/2,(t*exp(-3*t))/2,(exp(-5*t)*(t*exp(2*t)-exp(2*t)+1))/2]

[(exp(-5*t)*(exp(2*t)+t*exp(2*t)-1))/2,(exp(-5*t)*(exp(2*t)-1))/2,(exp(-3*t)*(t+2))/2,(exp(-5*t)*(exp(2*t)+t*exp(2*t)-1))/2]

[-(t^2*exp(-3*t))/2,-t*exp(-3*t),-(t*exp(-3*t)*(t+2))/2,-(exp(-3*t)*(t^2-2))/2]

(2)

symst;A=[-4.5,0,0.5,-1.5;-0.5,-4,0.5,-0.5;1.5,1,-2.5,1.5;0,-1,-1,-3];f=simple((expm(A*t*j)-expm(-A*t*j))/(2*j))

f=

[(t^2*sin(3*t))/2-sin(5*t)/2-(t*cos(3*t))/2-sin(3*t)/2,sin(3*t)/2-sin(5*t)/2+t*cos(3*t),(t*cos(3*t))/2+(t^2*sin(3*t))/2,sin(3*t)/2-sin(5*t)/2-(t*cos(3*t))/2+(t^2*sin(3*t))/2]

[sin(3*t)/2-sin(5*t)/2+(t*cos(3*t))/2,-4*sin(t)*(2*sin(t)^4-3*sin(t)^2+1),(t*cos(3*t))/2,sin(3*t)/2-sin(5*t)/2+(t*cos(3*t))/2]

[sin(5*t)/2-sin(3*t)/2+(t*cos(3*t))/2,sin(t)+8*sin(t)^3*(sin(t)^2-1),(t*cos(3*t))/2-sin(3*t),sin(5*t)/2-sin(3*t)/2+(t*cos(3*t))/2]

[-(t^2*sin(3*t))/2,-t*cos(3*t),-t*cos(3*t)-(t^2*sin(3*t))/2,-(sin(3*t)*(t^2+2))/2]

(3)

symst;A=[-4.5,0,0.5,-1.5;-0.5,-4,0.5,-0.5;1.5,1,-2.5,1.5;0,-1,-1,-3];

f=simple(expm(A*t)*(expm(A^2*expm(A*t)*t*j)-expm(-A^2*expm(A*t)*t*j))/(2*j))

f=

[(exp(-5*t)*sin(25*t*exp(-5*t)))/2+exp(-9*t)*sin(9*t*exp(-3*t))*(t^4*((81*i)/4)+t^3*(-27*i)+t^2*(9*i))*2*i-exp(-3*t)*sin(9*t*exp(-3*t))*(t^2*(i/4)+t*(-i/4)+i/4)*2*i+2*exp(-6*t)*cos(9*t*exp(-3*t))*((27*t^3)/4-(33*t^2)/4+2*t),(exp(-5*t)*sin(25*t*exp(-5*t)))/2-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/2-i/4)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*(3*t-(9*t^2)/2),54*t^3*exp(-9*t)*sin(9*t*exp(-3*t))-18*t^2*exp(-9*t)*sin(9*t*exp(-3*t))-(81*t^4*exp(-9*t)*sin(9*t*exp(-3*t)))/2-(t*exp(-3*t)*sin(9*t*exp(-3*t))*(t*i+i)*i)/2-(t*exp(-6*t)*cos(9*t*exp(-3*t))*(-27*t^2+15*t+4))/2,(exp(-5*t)*sin(25*t*exp(-5*t)))/2+exp(-9*t)*sin(9*t*exp(-3*t))*(t^4*((81*i)/4)+t^3*(-27*i)+t^2*(9*i))*2*i+exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4-(t^2*i)/4+i/4)*2*i+2*exp(-6*t)*cos(9*t*exp(-3*t))*((27*t^3)/4-(33*t^2)/4+2*t)]

[(exp(-5*t)*sin(25*t*exp(-5*t)))/2-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4-i/4)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*((3*t)/2-(9*t^2)/4),(exp(-3*t)*sin(9*t*exp(-3*t)))/2+(exp(-5*t)*sin(25*t*exp(-5*t)))/2,(t*exp(-6*t)*(exp(3*t)*sin(9*t*exp(-3*t))-6*cos(9*t*exp(-3*t))+9*t*cos(9*t*exp(-3*t))))/2,(exp(-5*t)*sin(25*t*exp(-5*t)))/2-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4-i/4)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*((3*t)/2-(9*t^2)/4)]

[-(exp(-5*t)*sin(25*t*exp(-5*t)))/2-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4+i/4)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*((3*t)/2-(9*t^2)/4),(exp(-3*t)*sin(9*t*exp(-3*t)))/2-(exp(-5*t)*sin(25*t*exp(-5*t)))/2,(9*t^2*exp(-6*t)*cos(9*t*exp(-3*t)))/2-3*t*exp(-6*t)*cos(9*t*exp(-3*t))-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4+i/2)*2*i,-(exp(-5*t)*sin(25*t*exp(-5*t)))/2-exp(-3*t)*sin(9*t*exp(-3*t))*((t*i)/4+i/4)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*((3*t)/2-(9*t^2)/4)]

[18*t^2*exp(-9*t)*sin(9*t*exp(-3*t))-(t^2*exp(-3*t)*sin(9*t*exp(-3*t)))/2-54*t^3*exp(-9*t)*sin(9*t*exp(-3*t))+(81*t^4*exp(-9*t)*sin(9*t*exp(-3*t)))/2-(t*exp(-6*t)*cos(9*t*exp(-3*t))*(27*t^2-24*t+2))/2,-t*exp(-6*t)*(exp(3*t)*sin(9*t*exp(-3*t))-6*cos(9*t*exp(-3*t))+9*t*cos(9*t*exp(-3*t))),18*t^2*exp(-9*t)*sin(9*t*exp(-3*t))-54*t^3*exp(-9*t)*sin(9*t*exp(-3*t))+(81*t^4*exp(-9*t)*sin(9*t*exp(-3*t)))/2+(t*exp(-3*t)*sin(9*t*exp(-3*t))*(t*i+2*i)*i)/2+(t*exp(-6*t)*cos(9*t*exp(-3*t))*(-27*t^2+6*t+10))/2,18*t^2*exp(-9*t)*sin(9*t*exp(-3*t))+exp(-3*t)*sin(9*t*exp(-3*t))*(t^2*(i/4)-i/2)*2*i-2*exp(-6*t)*cos(9*t*exp(-3*t))*((27*t^3)/4-6*t^2+t/2)-54*t^3*exp(-9*t)*sin(9*t*exp(-3*t))+(81*t^4*exp(-9*t)*sin(9*t*exp(-3*t)))/2]

第一题(第二部分)

(1)

symsat;f=sin(a.*t)./t;F=laplace(f,t)

F=

atan(a/t)

(2)

symsat;f=(t.^5).*(sin(a.*t));F=simple(laplace(f,t))

F=

(240*a*t*(a^2-3*t^2)*(3*a^2-t^2))/(a^2+t^2)^6

(3)

symsat;f=(t.^8).*(cos(a.*t));F=simple(laplace(f,t))

F=

(40320*t*(9*a^8-84*a^6*t^2+126*a^4*t^4-36*a^2*t^6+t^8))/(a^2+t^2)^9

 

第二题(第二部分)

(1)

symsabs;f=1./(s.*(s.^2-a.^2).*(s+b));F=simple(ilaplace(f,s,t))

F=

exp(a*t)/(2*a^2*(a+b))-1/(a^2*b)+exp(-b*t)/(b*(a^2-b^2))-exp(-a*t)/(2*a^2*(a-b))

(2)

symsasbt;f=sqrt(s-a)-sqrt(s-b);f=simple(ilaplace(f,s,t))

f=

1/2/t/(pi*t)^(1/2)*(exp(b*t)-exp(a*t))

(3)

symsasbt;f=log((s-a)./(s-b));f=simple(ilaplace(f,s,t))

f=

(exp(b*t)-exp(a*t))/t

第三题

(1)

symswtj;j=sqrt(-1);f=(t.^2).*(3*pi-2.*t).*exp(-j.*w.*t);f1=simple(int(f,t,0,2*pi))

f1=

2*(-6*w^2*pi^2+9*sqrt(-1)*w*pi-2*sqrt(-1)*w^3*pi^3+6+3*sqrt(-1)*exp(sqrt(-1)*w*pi)^2*w*pi-6*exp(sqrt(-1)*w*pi)^2)/exp(sqrt(-1)*w*pi)^2/w^4

(2)

symswt;f=t.^2.*(t-2*pi).^2.*exp(-j.*w.*t);f1=simple(int(f,t,0,2*pi))

f1=

-8*(-3*sqrt(-1)*exp(-2*sqrt(-1)*pi*w)+sqrt(-1)*exp(-2*sqrt(-1)*pi*w)*pi^2*w^2+3*exp(-2*sqrt(-1)*pi*w)*pi*w+3*sqrt(-1)-sqrt(-1)*pi^2*w^2+3*pi*w)/w^5

第四题(第二部分)

(1)

symsKTa;f=cos(K.*a.*T);f1=ztrans(f),f2=iztrans(f1,z,K)

f1=

(z*(z-cos(K*T)))/(z^2-2*cos(K*T)*z+1)

f2=

cos(K*T*a)

(2)

>>symsKTa;f=(K.*T).^2.*exp(-K.*T*a);f1=ztrans(f),f2=simple(iztrans(f1,z,K))

f1=

(K^2*T^2*z)/(z-exp(-K*T))

f2=

K^2*T^2*exp(-K*T*a)

(3)

symsaTKz;f=(a.*K.*T-1+exp(-a.*K.*T))./a;f1=simple(ztrans(f,K,z)),f2=simple(iztrans(f1,z,K))

f1=

T*z/(z-1)^2-1/a*z/(z-1)+1/a*z*exp(a*T)/(z*exp(a*T)-1)

f2=

(a*K*T-1+exp(-a*T)^K)/a

第五题

(1)

[x]=solve('exp(pi/2-(x-1)^2)*sin(5*x+2)=0'),y=[eval('exp(pi/2-(x-1)^2)*sin(5*x+2)')]

x=

-2/5

y=

0

(2)

[x]=solve('(x^2+y^2+x*y)*exp(-x^2-y^2+x*y)=0','x'),a=[eval('(x^2+y^2+x*y)*exp(-x^2-y^2+x*y)')]

x=

(-1/2+1/2*sqrt(-1)*3^(1/2))*y

(-1/2-1/2*sqrt(-1)*3^(1/2))*y

第9题

>>symsx;

y=dsolve('D2y-(2-1/x)*Dy+(1-1/x)*y=x^2*exp(-5*x)','x')

y=1/1296*exp(-5*x)*(6*Ei(1,6*x)*exp(6*x)+11+30*x+36*x^2)+C1*exp(x)+C2*log(x)*exp(x)

symsx;y=dsolve('D2y-(2-1/x)*Dy+(1-1/x)*y=x^2*exp(-5*x)',...

'y

(1)=sym(pi)','y(sym(pi))=1','x');y

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2