Question: B. (30%) Multiple Choice (Each question is 1 point.) 1. Which is the Matlab code of (2/d)e? (a) (2/d)ex+2) (b) (2/d)e(x+2) (e) (2/d) c x+2

 B. (30%) Multiple Choice (Each question is 1 point.) 1. Which
is the Matlab code of (2/d)e? (a) (2/d)ex+2) (b) (2/d)e(x+2) (e) (2/d)

B. (30%) Multiple Choice (Each question is 1 point.) 1. Which is the Matlab code of (2/d)e? (a) (2/d)ex+2) (b) (2/d)e(x+2) (e) (2/d) c x+2 (d) 2/dc(x+2) (e) (2/d) (c x+2) 2. Which one of the following variable-naming rules is incorrect? (a) The name can contain up to 63 characters (b) The name must start with a letter (c) Punctuation characters are not allowed (d) The name is case sensitive (e) All symbol characters are not allowed 3. Suppose A- [1 2 3; 456;7 8 91. In Matlab what is the result of command, A(1,21+ .2.3) ? (a) 5 (b) 8 (c) 12 (d) 7 (e) 6 4. Which variable name is invalid? (a) 2value (b) value one (c) valueone (d) v3 (e) valuel 5. Supposing that A [1, 2, 3, 4]. if we put A(7) 9, what is the value of A(5) in Matlab? (a) NaN (b) error (c) 0 (d) 9 (e) 7 6. In the command window, typex- 1:4:1 will create the array x equal to (a) 1411 (b) 1 3579 (c) 14710 (d) 1 5 10 (e) 1 59 )7. The command eyef2) will create (a)(b) 8. Matlab code: 59 will generate (a) 0 (b)1 (c)-1 (d) NaN (e) error 9. How many bytes does the variable a-csioi' take? (a) 2 (b) 4 (c) 8 (d) 10 (e) 12 10. A- [1 23; 456; 7 89]. What is the value of A(4)? (a) 5 (b)6 (c) 2 (d) 3 (e) 7 11. Which one of the following codes can produce the vector [21 18 15 12 9 61 (a) linspace(21,6,6) (b) linspace(21,18,15) (c) linspace(6,21,6) (d) linspace(6,6,21D (e) linspace( 12,9,6) 12 2345,6] (b) 12. Which one of the following codes cannot 13. Let x-[1 2 34 5]. Which one will be generated by x(1:2:5)? (a) [1251 (b) [1 2 3] (c) 14. Let x [1 234 5]. Which one will be generated by x(4:end)? (a) [5] (b) [] ()[I 51 (d) 15. The answer for (6c10)+(7 8)+(5 3 60/4) is (a) 0 (b) 1 (c) 2 (d)-1 (e) 3 [1:2:3:4:56] (c) [1 2 3:456] (d) [1:3:4:6] (e11.020,3.0:4.0,5.0,6.0] 3 5] (d) [3 4 5] (e) [1 2345) [4 5] (e)[1 2345 16. Let format bank; a- 12.345678. What will be displayed for a? (a) 12.35 (b) 12.34 (c) 12 (d) 12.3 (e) 12.345678 1 0.5 (b) error () os 025 -1 2 17. Let a-1 3 What is a J b? (a) -1 0.5 0.5 0.25 Pad * 59%. 12 (d) 12.3 (e 12.345678 3 of 5 -1 2 17.Let a4-3 1 0.5 (b) error () 0.5 0.25 What is a J b? (a) -1 0.5 -0.5 0.25 )18. Let a= The answer for a. c is (a) error (b) -1 2 -2 4 19. Let a 3 b-2; c5; d 3: What is a*b+c d? (a) 33 (b) 19 (c) 20 (d) 21 (e) 63 ag2.pdiseas-B :}...-B :)- ( )20. The answer ofcode d(1,2)=5; d(2,1)-3 is (a) d=l: il(b) d-, l(c) 1 2 3 ( )21.leta=14 5 6 The answer of ais (a) error (b) 8 (c) 10 (d) answ 22. Let x and y are two vectors. What is the element-by-element calculation for generating the 23. What data will be generated from the shortcut Matlab: 17:-5:-2]? (a) 17 6 (b) 17 12 72 (c) error (d) Empty matrix (e) 17 12 72 3 24. When x-1, y1, the code x-y will produce (a) 0 (b) 1 (c) 2 (d) -2 )25. Let value1 true and value2 true. What is the result of value1 value2 ? (a) 5 (b) 4 (c) 1 (d) 0 (e) 2 26. Let r(8 12 9 4 23]. The answer for r(2:4) is (a) [8 9 4] (b) 4 (c) [12 9 4] (d) 8 (e) error 27. The answer for 3 & 7 is (a) 0 (b) 10 (c) 3 (d) 1 (e) 7 28. The answer for and(7,-5) is (a) 1 (b) 0 (c)-1 (d)7 (e) -5 ) 29, Let x=-2; The answer for xc.1 is (a) I (b) 0 (c)-1 (d)-2 (e) error ) 30. Let x=linspace( 1,9,5). Then x = (a) [1 3 5 7 9] (b) [1 3.25 5.5 7.75 101 (c) [2 4 6 8 10] (d) [1 234 5] (e) [19 5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!