ImageVerifierCode 换一换
格式:DOCX , 页数:12 ,大小:37.47KB ,
资源ID:271125      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-271125.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(MATLAB及其工程应用B卷10级.docx)为本站会员(b****1)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

MATLAB及其工程应用B卷10级.docx

1、MATLAB及其工程应用B卷10级试题编号: 重庆邮电大学 2010/2011 学年 2学期MATLAB及其工程应用(普通班)试卷(期末)(B)(闭卷)题 号一二三四五六七八总 分得 分评卷人一、Fill in the blanks.(1 scores each. Total 30 scores.)1.1 Use MATLAB operator : to generate the vector of 0, , , _ _1.2 An is a collection of data values organized into rows and columns,and known by a sin

2、gle name.1.3 Write the results of the following MATLAB statements, if there is an error, please fill “error”.1)a=1 2 3;4 5 6, a(5)= _; a(8)= _;a(-2)= _ 2) x = 1:0.02:10; x = 3) u = 1:3 ; u u = _ _4) zeros(3,2) = _ _; ones(3) = _ _; a = 11 14 17; 12 15 18; 13 16 19 ;I=eye(3); a * I= _ _5) z = -2 0 9

3、1 4 ; z(2) = 5; z =_ _6) u = 22 -3 15 7 0 ; u(1)= u(4); u =_ _7) v=12 13 -3 9 -11 ; v(6)=7, v =_ _8) w = 1 4 7; 2 5 8; 3 6 9 ; w(2:end,2:end) = 0; w =_ _9) c = 1 2 3; 4 5 6; 7 8 9 ; c(1,1 3) = -3; c=_ _10) date = num2str(1) -July- num2str(2011) ; ans = _ _11) fprintf( Area of a circle with radius %d

4、 is %7.4f, 2, pi*22 );ans = _ _12)a = 1 2; 3 4 ; b = 5 6; 7 8 ; a+b= _;a*b= _; a.*b= _;2a= _1.4 Assume that array array1 is defined as shown, and determine the contents of the following sub-arrays. array11 = 4 3 2 1; 4 6 7 8; 9 10 11 12 1) array11(3, :) = _ _ 2) array11(1:3, 2 2 3 3) = _ _ 3) array1

5、1(2 3, 4 3) = _ _1.5 Assume that a,b,c,and d are as defined,and evaluare the following expressions:a=0,5;3,-2; b=-1,2;0,3; c=2; d=3,-5,7;1,0,21) (ab)ans = _ _ _2) ac&bcans = _ _ _3) aa*cans = _ _2) d|baans = _ _ _3) (d|b)a ans = _ _ _二、Chose the best answer for the following questions.2 scores each.

6、 Total 20 scores.)2.1 Among the following MATLAB variable names, the illegal one is A. Faint B. dont_bother_me C. Help_me D. godSaveMe 2.2 A = 1 2 3; 9 6 5; 3 4 7, then A(1, :) is _ _ A. 1 2 3 B. 1 C. 1; 7 D. 1 2 3; 9 6 5; 3 4 7 2.3 Among the following comments about MATLAB, the correct one is _ _ A

7、. MATLAB can not plot 3-D pictures B. MATLABs variables need to be defined before they are used C. A MATLAB function can return more than 1 variable D. A MATLAB array can not have string inside2.4 About the simultaneous equations(线性方程组)Ax = b, the following MATLAB statement which can solve the value

8、 of x is _ A. x = A/b B. x = A./b C. x = Ab D. x = A.b2.5 Assume x=1:-2:-8, then x(1 5) is _ _ A 1,-8 B-1, -7 C-1, -8 D 1, -72.6 Among the following MATLAB expressions, _ _ has the different result. A. 34 B. pi=3.1415 C. floor(pi) - 3 D. zeros(1,2) 2.7 The execute result of MATLAB expression a = 7+5

9、*3/4-sin(pi/2) is _ _ A. a = 12 B. a = 8 C. a = 9.75 D. a = 10.75 2.8 After execute the following MATLAB expressions, the result of s is_ _ s = 0; for k = 1:10 if k5 continue; end s = s + k; end A. s = 10 B. s = 15 C. s = 55 D. s = 6 2.9 Among the following matlab expressions, _ _ has no errors. A.

10、a = 3; a(3) = 3; B. a = zeros(1, 2) ones(2, 1) C. a = 1 2; b = 3 4 5; c =a*b; D. t=1:10; y=t*t+1;2.10 After execute the following MATLAB expressions, the result of y is _ y=; for t = -1:2 y = y t2; end A. B. error C. 1 0 1 4 D. 1 2 3三、Read the following MATLAB statements and write the execute result

11、s. (4 scores each. Total 20 scores.)3.1 format short;s1 = 0;while s1=0 % 能正确运用if语句,给2分 Y(k)=-7*t.*t-sqrt(t)+exp(3); %能正确写出表达式给1分 else Y(k)=7*t.*t+sqrt(t)+exp(3); endend五、x=0:pi/20:pi*2; %正确产生x的值以及正确产生y1、y2给1分y2=x.2+3*x-7; y1=sin(2*x)+3;plot(x,y1,:,x,y2,-); %1分title(y1(x) and y2(x) %1分xlabel(x);ylabe

12、l(y1 and y2);%1分legend(y1,y2); %1分grid on; %1分六、由于题目维数不一致,所以去掉最后一行。试卷中只要思想和代码的写法正确即算正确clca=-0.2 5.0 1.0 3.0 4.0 2.0 -1.0 -0.5 -2.0 6.0 -1.0 6.0 -4.0 -5.0 -2.0 4.0 3.0 -6.0 -5.0 -2.0 -3.0 6.0 4.0 2.0 -6.0b=0.0;1.0;-6.0;10.0;-6.0 %正确写出矩阵3分x=ab %正确得出结果3分七、function plottangentx=-5:0.1:5;y=coshf(x); %正确调用给2分plot(x,y); function y=coshf(x) %正确写出函数3分y=(exp(x)+exp(-x)/2; %正确完成功能给1分八、function factn=input(n=) %if(n0) y=myfun(n); %调用函数及显示2分 fprintf (%d!累加和=%d,n,y)endfunction s=myfun(n) %被调函数2分s=0;for k=1:n s=s+factorial(k);end

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

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