1. (20 points) Circle the correct answer for each question related to MATLAB. (a
ID: 1766923 • Letter: 1
Question
1. (20 points) Circle the correct answer for each question related to MATLAB. (a) 5 points) A is a 4 x 4 matrix. How do you access the element in column 3, row 2? iii) A(4,3,2) (v) A(4,4,2,3) (ii) A(2,3) iv) A(4,4,3,2) (vi) None of the above (b) 5 points) Which of the following creates the rour vector v- [1, 3, 5. 71? (vi Both () and (iv) iv) - 1 2 7 (v) Both (i) and (ü) (vi) Both i) and iii) (ii) v 13 57 (iii) v-1: 7 (c) (5 points) What will be the value of x after the following lines of code are run? for 1:3 x-x1 end (i) x2 (ii) x-1 (ii) x - 3 (iv) x -4 (d) (5 points) What wl be the value of x after the following lines of code are run? if x -1 else end (ii) x - 1 iv) None of the aboveExplanation / Answer
a)
I) A (3,2)
Where first comes row than column
Ii)
IV) v=1:2:7
Here 2 is added to 1 till it becomes 7 and returns row vector
c) 1 will be added to x= -2 upto 3 times
Hence it will returns x=-2+1+1+1=1
II ) x= 1
d)
Since x is greater than 1 hence it will satisfy the first 'if' statement
Hence
III) x=1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.