Can you plz solve this using Autocad? 6. Create the following matrix M: Use the
ID: 2996983 • Letter: C
Question
Can you plz solve this using Autocad?
6. Create the following matrix M: Use the matrix M to: a) Create a five element row vector named MatA that contains the elements of the second row of M. b) Create a three element row vector named MatB that contains the elements of the fourth column of M. c) Create a ten element row vector named MatC that contains the elements of the first and second rows of M. d) Create a six element row vector named MatD that contains the elements of the second and fifth column of M. 7. Create these 3 arrays by using either commas or linespace: C=[49.5 49.1875 48.875 48.5625 48.25 47.9375 47.625 47.3125 47] a) Replace the last 4 column of the 1st and 4th rows of A with the last 4 columns of the 1st and 3rd rows of B. b) Replace the first 4 columns of the 2nd row of A with the 2nd,4th,6th,8th elements of C. c) Replace the 2nd and 3rd rows of the last column of A with the last 2 rows of 1st column of B.Explanation / Answer
answer 6
you first create the array M and then use commands/indexes to extract the rows/columns into the va, vb, vc,and vd row vectors:
here is the command to create M:
EDU>> M = [6,43,2,11,87;12,6,34,0,5;34,18,7,41,9]
M =
6 43 2 11 87
12 6 34 0 5
34 18 7 41 9
va is a simple row extraction from M
EDU>> va = M(2,:)
va =
12 6 34 0 5
vb is a column extract from M, but use the tick (') operator to change from column to row:
EDU>> vb = M(:,4)'
vb =
11 0 41
for vc, extract two rows and concatenate them into a single row vector:
EDU>> vc = [M(1,:),A(2,:)]
vc =
6 43 2 11 87 12 6 34 0 5
finally, for vd, extract two columns and use the tick (') operator to concatenate them into a row vector:
EDU>> vd = [M(:,2)',A(:,5)']
vd =
43 6 18 87 5 9
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.