matlab数学实验 南邮,MATLAB验练习题(计算机) 南邮 MATLAB 数学实验大作业答案

7)???0e?xsin2xdx

>> syms x;

>> y=exp(-x)*sin(2*x); >> int(y,0,inf) ans = 2/5

8) 将1?x在x?0展开 (最高次幂为8)

>> syms x f=sqrt(1+x); taylor(f,0,9) ans =

- (429*x^8)/32768 + (33*x^7)/2048 - (21*x^6)/1024 + (7*x^5)/256 - (5*x^4)/128 + x^3/16 - x^2/8 + x/2 + 1 9) y?esin1x求y(3)(2)

>> syms x y;

>> y=exp(sin(1/x));

>> dy=subs(diff(y,3),x,2) dy =

-0.5826

10)求变上限函数?

>> syms a t;

5

x2xa?tdt对变量x的导数。

>> diff(int(sqrt(a+t),t,x,x^2))

Warning: Explicit integral could not be found. ans =

2*x*(x^2 + a)^(1/2) - (a + x)^(1/2)

4、求点(1,1,4)到直线L:

x?3yz?1 的距离 ???102

>> M0=[1,1,4];M1=[3,0,1];M0M1=M1-M0; v=[-1,0,2];

d=norm(cross(M0M1,v))/norm(v) d =

1.0954

?1e5、已知f(x)?2??(x??)22?2,分别在下列条件下画出f(x)的图形:(要求贴图)

(1)??1时,?=0,-1,1,在同一坐标系里作图

>> syms x;

>> fplot('(1/sqrt(2*pi))*exp(-((x)^2)/2)',[-3,3],'r') >> hold on

>> fplot('(1/sqrt(2*pi))*exp(-((x-1)^2)/2)',[-3,3],'y') >> hold on

>> fplot('(1/sqrt(2*pi))*exp(-((x+1)^2)/2)',[-3,3],'g') >> hold off

(2)?=0时,?=1,,24,在同一坐标系里作图。

6

>> syms x;

fplot('(1/sqrt(2*pi))*exp(-((x)^2)/2)',[-3,3],'r') hold on

fplot('(1/(sqrt(2*pi)*2))*exp(-((x)^2)/(2*2^2))',[-3,3],'y') hold on

fplot('(1/(sqrt(2*pi)*4))*exp(-((x)^2)/(2*4^2))',[-3,3],'g') hold off

6、画下列函数的图形:(要求贴图)

??x?usint0?t?20?(1)?y?ucost

0?u?2?t?z?4?

>> ezmesh('u*sin(t)','u*cos(t)','t/4',[0,20,0,2])

(2) z?sin(xy)0?x?3,0?y?3

>> x=0:0.1:3;y=x; [X Y]=meshgrid(x,y); Z=sin(X*Y); >> mesh(X,Y,Z)

7

?x?sint(3?cosu)?(3)?y?cost(3?cosu)?z?sinu?0?t?2?

0?u?2?ezmesh('sin(t)*(3+cos(u))','cos(t)*(3+cos(u))','sin(u)',[0,2*pi,0,2*pi])

?4?22??134?????7、 已知A???305?,B???20?3?,在MATLAB命令窗口中建立A、B矩阵并?153??2?11?????对其进行以下操作:

(1) 计算矩阵A的行列式的值det(A) >> A=[4,-2,2;-3,0,5;1,5,3]; >> det(A)

ans =

-158

(2) 分别计算下列各式:2A?B,A*B,A.*B,AB?1,A?1B,A2,AT

8

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值