东北大学MATLAB报告优秀.docx
- 文档编号:2870964
- 上传时间:2022-11-16
- 格式:DOCX
- 页数:25
- 大小:408.17KB
东北大学MATLAB报告优秀.docx
《东北大学MATLAB报告优秀.docx》由会员分享,可在线阅读,更多相关《东北大学MATLAB报告优秀.docx(25页珍藏版)》请在冰豆网上搜索。
东北大学MATLAB报告优秀
Matlab实验
专业:
电子信息工程
班级:
1102班
姓名:
学号:
2.>>A=[1234;4321;2341;3241]
A=
1234
4321
2341
3241
>>B=[1+4j2+3j3+2j4+1j;4+1j3+2j2+3j1+4j;2+3j3+2j4+1j1+4j;3+2j2+3j4+1j1+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
3.>>A=magic(8)
A=
642361606757
955541213515016
1747462021434224
4026273736303133
3234352928383925
4123224445191848
4915145253111056
858595462631
>>B=A(2:
2:
end,:
)
B=
955541213515016
4026273736303133
4123224445191848
858595462631
4.数值解:
>>i=0:
63;s=sum(2.^i)
s=
1.8447e+019
解析解:
>>symsk;
symsum(2^k,0,63)
ans=
184********709551615
5.
(1)
>>t=[-1:
0.03:
-0.25,-0.248:
0.001:
-0.001,0.001:
0.001:
0.248,0.25:
0.03:
1];
y=sin(1./t);plot(t,y)
(2),>>t=[-pi:
0.05:
-1.8,-1.799:
0.001:
-1.2,-1.2:
0.05:
1.2,1.201:
0.001:
1.8,1.81:
0.05:
pi];
y=sin(tan(t))-tan(sin(t));
plot(t,y)
6.
>>x1=[-3:
0.1:
-0.01,0.01:
0.1:
3];
>>y1=[-2:
0.1:
-0.1,0.01:
0.1:
2];
>>[x,y]=meshgrid(x1,y1);
>>z=1./(sqrt((1-x).^2+y.^2))+1./(sqrt((1+x).^2+y.^2));
>>surf(x,y,z),shading
>>subplot(224),surf(x,y,z);
>>subplot(221),surf(x,y,z),view(0,90);
>>subplot(222),surf(x,y,z),view(90,0);
>>subplot(223),surf(x,y,z),view(0,0);
7:
(1)
>>symsx;limit((3^x+9^x)^(1/x),x,inf)
ans=
9
(2)
>>symssy;limit(limit((x*y)/(sqrt(x*y+1)-1),x,0),y,0)
ans=
2
(3)
>>symsxy;
limit(limit((1-cos(x^2+y^2))/((x^2+y^2)*exp(x^2+y^2)),x,0),y,0)
ans=
0
8:
>>symst;
>>x=log(cos(t));
>>y=cos(t)-t*sin(t);
>>f1=diff(y,t)./diff(x,t),f2=diff(f1,t)./diff(x,t),subs(f2,t,pi/3)
f1=
(cos(t)*(2*sin(t)+t*cos(t)))/sin(t)
f2=
(cos(t)*(2*sin(t)+t*cos(t)+(cos(t)^2*(2*sin(t)+t*cos(t)))/sin(t)^2-(cos(t)*(3*cos(t)-t*sin(t)))/sin(t)))/sin(t)
ans=
1.5387
9:
>>symsxyt;f=int(exp(-t^2),t,0,x*y);
>>f1=diff(f,x,2);f2=diff(f,y,2);f3=diff(diff(f,x),y);
>>f4=(x/y)*f1-2*f3+f2;
>>simple(f4)
ans=
-2*exp(-x^2*y^2)*(-x^2*y^2+1+x^3*y)
10:
(1)
>>symsn;limit(symsum(1/((2*n)^2-1),n,1,n),n,inf)
ans=
1/2
(2)
>>symsnm;
>>limit(n*symsum(1/(n^2+m*pi),m,1,n),n,inf)
ans=
1
11.
(1)
>>symst;
>>symsapositive;
>>x=a*(cos(t)+t*sin(t));
>>y=a*(sin(t)-t*cos(t));
>>I=int((x.^2+y.^2)*sqrt(diff(x,t).^2+diff(y,t).^2),t,0,2*pi)
I=
2*a^3*pi^2+4*a^3*pi^4
(2)
>>symstabc;
>>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=int(F*ds,t,pi,0)
I=
(2*c*(15*b^4-2*c^4))/(15*a*b^4)
12..m.文件;
functionA=vander(v)
n=length(v);v=v(:
);A=sym(ones(n));
forj=n-1:
-1:
1,A(:
j)=v.*A(:
j+1);end
>>symsabcde;
>>A=vander([abcde]);
>>B=det(A);
>>Z=simple(B)
Z=
-(-a+d)*(-a+c)*(c-d)*(-a+b)*(b-d)*(b-c)*(-a+e)*(e-d)*(e-c)*(-b+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,V]=jordan(sym(A))
J=
[0,1/2,1/2,-1/4]
[0,0,1/2,1]
[1/4,1/2,1/2,-1/4]
[1/4,1/2,1,-1/4]
V=
[-4,0,0,0]
[0,-2,1,0]
[0,0,-2,1]
[0,0,0,-2]
14.
(1)数值解
>>A=[3,-6,-4,0,5;1,4,2,-2,4;-6,3,-6,7,3;-13,10,0,-11,0;0,4,0,3,4];
>>B=[3,-2,1;-2,-9,2;-2,-1,9];
>>C=-[-2,1,-1;4,1,2;5,-6,1;6,-4,-4;-6,6,-3];
>>X=lyap(A,B,C),norm(A*X+X*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
ans=
2.7917e-013
(2)解析解
M文件:
functionX=lyap(A,B,C)
ifnargin==2,C=B;B=A';end
[nr,nc]=size(C);A0=kron(A,eye(nc))+kron(eye(nr),B');
tryC1=C';x0=-inv(A0)*C1(:
);X=reshape(x0,nc,nr)';
catch,error('singularmatrixfound.'),end
>>A=[3,-6,-4,0,5;1,4,2,-2,4;-6,3,-6,7,3;-13,10,0,-11,0;0,4,0,3,4];
>>B=[3,-2,1;-2,-9,2;-2,-1,9];
>>C=-[-2,1,-1;4,1,2;5,-6,1;6,-4,-4;-6,6,-3];
>>X=lyap(sym(A),B,C),norm(double(A*X+X*B+C))
X=
[434641749950/107136516451,4664546747350/321409549353,-503105815912/321409549353]
[-3809507498/107136516451,-8059112319373/321409549353,880921527508/321409549353]
[-1016580400173/107136516451,-8334897743767/321409549353,1419901706449/321409549353]
[-288938859984/107136516451,-6956912657222/321409549353,927293592476/321409549353]
[-827401644798/107136516451,-10256166034813/321409549353,1209595497577/321409549353]
ans=
0
15.
(1)
>>A=[-4.500.5-1.5;-0.5-40.5-0.5;1.51-2.51.5;0-1-1-3];
>>A=sym(A);symst;
>>expm(A*t)
ans=
[1/2*exp(-3*t)-1/2*t*exp(-3*t)+1/2*exp(-5*t)+1/2*t^2*exp(-3*t),1/2*exp(-5*t)-1/2*exp(-3*t)+t*
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 东北大学 MATLAB 报告 优秀