资源描述:
《matlab与科学计算样题(加主观题附标准答案)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Matlab与科学计算考试样题(客观题)1下面的MATLAB语句中正确的有:a)2a=pi;b)record_1=3+4ic)a=2.0,d)c=1+6j2.已知水的黏度随温度的变化公式如下,其中a=0.03368,b=0.000221,计算温度t为20,30,40度时的粘度分别是:矚慫润厲钐瘗睞枥庑赖。为0℃水的黏度,值为;a、b为常数,分别为0.03368、0.000221.(a)0.00180.00100.0007(b)0.00100.00070.0005(0.00100.00080.0007)聞創沟燴鐺險爱氇谴净。(c)1.7850e-0031.0131e-0036.6092e
2、-004(d)1.0131e-0036.6092e-0044.6772e-004(1.0131e-0038.0795e-0046.6092e-004)a=0.03368;b=0.000221;u0=1.785e-3;t=[203040];u=u0./(1+a*t+b*t.^2)>>formatshort%formatshorte>>u残骛楼諍锩瀨濟溆塹籟。3.请补充语句以画出如图所示的图形:[x,y]=meshgrid(-2:0.1:2,-2:0.1:2);Z=x.*exp(-x.^2-y.^2); ;a)Plot3(x,y,Z)b)plot3(x,y,Z)c)mesh(x,y,Z)d
3、)plot3(x,y,z)4.设y=span{1,x,x2},用最小二乘法拟合如下表数据.x0.51.01.52.02.53.0y1.752.453.814.808.008.60计算的结果为:a)0.49001.25010.8560b)0.85601.25010.4900c)-0.63413.8189-3.7749d)3.8189-3.77492.8533解释说明:>>x=0.5:0.5:3.0;>>y=[1.75,2.45,3.81,4.80,8.00,8.60];>>a=polyfit(x,y,2)a=0.49001.25010.8560>>x1=[0.5:0.25:3.0];>>
4、y1=a(1)*x1.^2+a(2)*x1+a(3)>>plot(x,y,'*')>>holdon>>plot(x1,y1,'--r')5.求方程在x=0.5附近的根.a)0.6180b)-1.1719e-25fzero('x.^2+x-1',0.5)c)-1d)-1.61806.用Newton-Cotes方法计算如下积分functionf=fun(x)f=x.*x.*sqrt(2*x+3)quadl(‘fun’,1,5,1e-10)或quadl('x.*x.*sqrt(2*x+3)',1,5,1e-10)或fun=@(x)(x.*x.*sqrt(2*x+3));quadl(fun,1
5、,5,1e-10)酽锕极額閉镇桧猪訣锥。(a)133.6625(b)23.8600(c)87.9027(d)-1.6180symsxy=log(1+x)f=diff(y,2)subs(f,1)7.y=ln(1+x),求x=1时y"的近似值.彈贸摄尔霁毙攬砖卤庑。a)-0.25b)0.5c)-0.6137d)-1.61378.某公司用3台轧机来生产规格相同的铝合金薄板.取样测量薄板的厚度,精确至‰厘米.得结果如下:轧机1:0.2360.2380.2480.2450.243轧机2:0.2570.2530.2550.2540.261轧机3:0.2580.2640.2590.2670.262计
6、算方差分析结果,并判定各台轧机所生产的薄板的厚度有无显著的差异?>>X=[0.2360.2380.2480.2450.243;0.2570.2530.2550.2540.261;0.2580.2640.2590.2670.262];>>P=anova1(X')a)p=1.3431e-005,没有显著差异.謀荞抟箧飆鐸怼类蒋薔。b)p=0.9688,没有显著差异.c)p=0.4956,有显著差异.d)p=0.9688,有显著差异.9.求解如下非线性方程组在(x=-1,y=-1)附近的解a)0.56710.5671functionF=myfun(x)F=[2*x(1)-x(2)-exp(-
7、x(1));-x(1)+2*x(2)-exp(-x(2))];x=fsolve('myfun',[-1,1])或者fsolve('[2*x(1)-x(2)-exp(-x(1));-x(1)+2*x(2)-exp(-x(2))]',[-11])b)无解厦礴恳蹒骈時盡继價骚。c)无穷解d)0010.采用ODE45求解如下多阶常微分方程,并求出当x=1.8505时的函数值.建立求解函数文件myfun03functiondy=myfun03(x,y)d