Q1) Create a file called Questionl.m. Your assignment document should contain th
ID: 2266365 • Letter: Q
Question
Q1) Create a file called Questionl.m. Your assignment document should contain the code from this file and a screenshot of the command window after you have run the file. (20 marks) Write a MATLAB program that carries out the following tasks. 4 0711 -3 2 0 12 3 10 8 4 5 5 0 1 a) Create the matrix A in your file: A= b) c) d) Write code to create a vector v consisting of the elements in the fourth column of A. Write code to create a vector w consisting of the elements in the first row of A. Write code to create a [4x3] array B with all elements in the second through fourth columns of A. e) Write code to create variables v_len and w_len that contain the lengths of v and w 0 Write code to create variables A size and B._size that contain the sizes of A and B 8) Write code that displays the variables v, B, w len, and B_size in the command window respectively. respectively.Explanation / Answer
a)
b)
c)
d)
e)
f)
g)
disp(v);disp(B),disp(w_len);disp(B_size);
command window output:
v
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.