资源描述:
《数学与软件上机作业》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、数学与软件MATLAB上机作业学院:数学与统计学院班级:071211班l符号运算:1.求符号矩阵的行列式值和逆,所得结果应采用“子表达式置换”简洁化。程序:A=sym('[a11a12a13;a21a22a23;a31a32a33]');B=det(A);C=inv(A);[Bs,e]=subexpr(B,'e')[Cs,d]=subexpr(C,'d')运行结果:Bs=a11*a22*a33-a11*a23*a32-a12*a21*a33+a12*a23*a31+a13*a21*a32-a13*a22*a31e=[emp
2、tysym]Cs=[d*(a22*a33-a23*a32),-d*(a12*a33-a13*a32),d*(a12*a23-a13*a22)][-d*(a21*a33-a23*a31),d*(a11*a33-a13*a31),-d*(a11*a23-a13*a21)]8/8[d*(a21*a32-a22*a31),-d*(a11*a32-a12*a31),d*(a11*a22-a12*a21)]d=1/(a11*a22*a33-a11*a23*a32-a12*a21*a33+a12*a23*a31+a13*a21*a32-
3、a13*a22*a31)>>1.对函数,当为正实数,求。程序:symskazf=a^k*z^(-k);S=symsum(f,k,0,inf)运行结果:S=piecewise([a=z,Inf],[a<>0andz=0,0],[a<>zandz<>0,limit((a^k*z)/(z^k*(a-z)),k=Inf)-z/(a-z)])>>2.对,求。程序:symskxf=2*((x-1)/(x+1))^(2*k+1)/(2*k+1)S=symsum(f,k,0,inf)运行结果:f=(2*((x-1)/(x+1))^(2*k
4、+1))/(2*k+1)S=piecewise([abs(x+1)*(abs(x-1)-abs(x+1))<0,2*atanh((x-1)/(x+1))])>>3.求的导数,,程序:symsxf=abs(sin(x))g=diff(f,x)8/8g1=subs(g,x,-eps)g2=subs(g,x,pi/2)运行结果:f=abs(sin(x))g=sign(sin(x))*cos(x)g1=-1g2=6.1232e-017>>1.计算二重积分程序:symsxyf=int(int((x^2+y^2),y,1,x^2),x
5、,1,2)vpa(f)运行结果:f=1006/105ans=9.5809523809523809523809523809524>>2.求的Fourier变换,并画出时的频谱程序;symsAtwtao;ft=A*(1-abs(t)/tao)*(heaviside(t+tao)-heaviside(t-tao));Fw=fourier(ft,t,w)h=subs(Fw,A,2);h=subs(h,tao,2);x=linspace(-20,20,1000);sn=subs(h,w,x);plot(x,sn)8/8运行结果:Fw
6、=A*((sign(tao)/w^2+1/w^2+pi*dirac(-w,1)*i-(exp(tao*w*i)*sign(tao))/w^2+(tao*exp(tao*w*i)*sign(tao)*i)/w)/tao-(1/w^2-sign(tao)/w^2+pi*dirac(-w,1)*i+((1/exp(tao*w*i))*sign(tao))/w^2+(tao*(1/exp(tao*w*i))*sign(tao)*i)/w)/tao+(1/exp(tao*w*i))*(-pi*dirac(-w)+i/w)-exp(t
7、ao*w*i)*(-pi*dirac(-w)+i/w))Warning:ImaginarypartsofcomplexXand/orYargumentsignored>Inworkfiveat10>>8.用solve求方程组的解。程序:symsxyS=solve(x^2+y^2-1,x*y-2,x,y)x1=S.xx2=S.y运行结果:S=x:[4x1sym]y:[4x1sym]x1=(1/2+(15^(1/2)*i)/2)^(1/2)/2-(1/2+(15^(1/2)*i)/2)^(3/2)/2-(1/2+(15^(1/
8、2)*i)/2)^(1/2)/2+(1/2+(15^(1/2)*i)/2)^(3/2)/2(1/2-(15^(1/2)*i)/2)^(1/2)/2-(1/2-(15^(1/2)*i)/2)^(3/2)/2-(1/2-(15^(1/2)*i)/2)^(1/2)/2+(1/2-8/8(15^(1/2)*i)