MATLAB Language样卷B

2020-05-23 14:23

… … _…__…__…__…__…_…__…__…号_……学) 线 _(_…__…__…__…_…__…__…_…名_…姓…… … )班封__(__…_…__…__…__…级…_…__…__…_…__…__…院)学密_(__…__…__…_…__…__…__……___…_……… 四川师范大学物理与电子工程学院 电子信息工程、通信工程专业 MATLAB Language样卷B 答卷说明:1、本试卷共7页,5个大题,满分100分,120分钟完卷。 2、本试卷必须以英语作答,否则不得分 3、开卷考试 一 二 三 四 五 总分 总分人

题号 效 分数 无 得分 评卷人 一、填空题:(共25分,每空1分) 题 1. When MATLAB executes, it can display several types of windows that accept commands or display information, the three most important types of windows 答 are , where commands may be entered; Figure Windows, which display plots and graphs; and Edit/Debug Windows, which permit a user to create and modify MATLAB programs. 内 2. Type proper commands on the underlines. (1) The contents of the Command Window can be cleared using the command. 线 (2) Command can list content of the workspace 3. What are the values of the following command assuming that 封 a) x=[1 6 -2; 5 4 2; 0 3*i 8]; b) y(3,3)= -5; c) z = [zeros(1,4); ones(1,4); ones(4,1)’]; 密 d) u=linspace(0,10,6); e) v=[-1; 20; 3]; f) v(5)=x(2,1); (1) The value of y(2,2) is (2) The value of x(5) is (3) The value of z is 物理与电子工程学院电子信息工程、通信工程专业MATLAB试卷B 第1 页(共7 页)

(4) The value of u is (5) After statement (f) is executed, the value of v is

4. Assume value = pi, what is the output from following sets of statements.

(1) fprintf(‘value = %3.2e\\n’, value) ; (2) disp(['value = ' int2str(value)]);

5. Evaluate each of the following expressions.

(1) 2*5/2^2+2 (2) floor(-11/5)+5

6. Assume that a, b, c, d, and e are as defined, specify the results in each case:

a = 3; b = -1; c = 10; d=0; e = ‘Test’;

(1) a&b>b (2) a>b&ischar(e) (3) isinf(a/d)

7. Assume x = 10 + i * 5, y = 5 – i * 15, result = real(x) + imag(y), the value of result is 8. If a = ones(4,3,2), result1= ndims(a), and result2 = size(a), the value of result1 is , the value

of result2 is

9. Function is used to open files, and function is used to close files.

10. If you intend to modify the properties of an object that you create, save the handle of that object for later use

with ??2.5?2.211. Assume that array c???6.5

? ??1.1 the following subarrays:

1.14.20.62.70.8?1.60.56.5?5.1??3.1? is defined as shown, and determine the contents of 4.3??7.5? (1) c(:, 2 ) (2) c([2 3], 3)

12. Determine the contents of array b after the following statements are executed.

(1) b=[2 4 8; 1 2 3; 3 6 9]; (2) b=eye(3,3); b([1 3], : )=b([2 2], : ) a=[4 5 6]; b(3, : )=a([2 1 3])

物理与电子工程学院电子信息工程、通信工程专业MATLAB试卷B 第2 页(共7 页)

得分 评卷人 …………… 二、判断题:(共10分,每题2分,正确的打√,错误的打×) 1. 2. The relational operators >, >=, <, and <= only compare the magnitudes of complex numbers, not their real parts. ( ) ____ If a1 = 5 + i2, a2 = 3 + i6, then the relational operation abs (a1 ) < abs (a2) produces a 1

___…__…_…__…__…号_……学) 线 _(_…__…__…__…_…__…__…_…名_…姓…… … )班封__(__…_…__…__…__…级…_…__…__…_…__…__…院)学密_(__…__…__…_…__…__…__……___…_……… ( ) 3. If a1 = 5 + i2, a2 = 5 - i6, then the relational operation a1 ~ = a2 produces a 0 ( )

4. The save –ascii command will not save cell array or structure array data at all, and it 效 converts string ddata to numbers before saving it. ( ) 5. Pushbuttons, toggle buttons, radio buttons, check boxes, list boxes, popup menus, and 无 sliders of the GUI components described respond to mouse clicks. Edit boxes respond to keyboard inputs. ( ) 题 得分 评卷人 三、简答题:(共25分) 答 1. (6分) Normally, a new plot is created each time that a plot command is issued, and the previous data is lost. How can you let all additional plots be laid on top of the previously existing plots. And what command can switch plotting behavior back to the default 内 situation. 线 封 密 2. (5分) How does the help command work with user-defined function?

物理与电子工程学院电子信息工程、通信工程专业MATLAB试卷B 第3 页(共7 页) 3.

(6分)Write the equations of the following Simulink model.

1x'sIntegrator1sIntegrator1x|u|2MathFunction2GainDot Product1Constant

4.

(8分) Assume that a, b, c, and d are defined as follows, and calculate the results of the following operations if they are legal. If an operation is illegal, explain why it is illegal. a=2; b???1?0?2??1c?; ??10??0?1???2d?; ??2??0112?? 0?(1) result = a * d

(2) result = b .*d

(3) result = ~(b&c)

(4) result = c<=d

物理与电子工程学院电子信息工程、通信工程专业MATLAB试卷B 第4 页(共7 页)

… … __…_…__…__…__…_…__…__…_… 号…效学) 线 ( __…无_… _… _ _… _ __…题_… _… _ _… _ 名_…答… 姓… … ) 班封内( _ _… _ _ _… _ _…_线_… _ _… 级… _… __…封_ _… _… _ _… _… 院_)密学密_(__…__…__…_…__…__…__…_…__…_……… 得分 评卷人 四、判断分析题: (共16分) 1. (9分) Given the definition of array a that follows, determine whether these statements are correct. If they are , what is produced by each set of statements? If they are illegal, explain why. a{1, 1} = [1 2 3; 4 5 6; 7 8 9] a(1, 2) = {‘final test’} a{2, 1} = i; a{2, 2} = a{1, 1} – a{1, 1}(2, 2) (1) a(2, 2) (2) 2*a(1,1) (3) a{2, 2} 2. (3分) Determine whether these statements are correct or not. If they are error, specify what is wrong with them. fid = fopen(‘file1’, ‘rt’); array = fread(fid, Inf) fclose(fid); 3. (4分) Determine whether these statements are correct or not. If they are error, specify what is wrong with them. a = 10*pi; b = 3; c = ‘final test’; fprintf(fid, ‘%d %d %g\\n’,a,b,c) 物理与电子工程学院电子信息工程、通信工程专业MATLAB试卷B 第5 页(共7页)


MATLAB Language样卷B.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:数据通信与计算机网络课后习题

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: