Question: [ arrays ] Use arrays and array manipulation methods to satisfy the below requirements. ( a ) ( 9 points ) Create the following matrix

[arrays] Use arrays and array manipulation methods to satisfy the below requirements.
(a)(9 points) Create the following matrix using diag function,
A=[2.29(103)5.800005.82.29(103)5.800005.82.29(103)5.800005.82.29(103)5.800005.82.29(103)5.800005.82.29(103)]
Usage of diag:
-- M = diag (V, K)
Return a diagonal matrix with vector V on diagonal K .
The second argument is optional. If it is positive, the vector is placed on the K-th superdiagonal. If it is negative, it is placed on the - K -th subdiagonal. The default value of K is 0, and the vector is placed on the main diagonal. For example:
diag ([1,2,3],1)
=>{:[0,1,0,0]
0,020
0,0,0,3
0000
Fill in the blanks in the answer:
ptptpt
(b)(6pt points) Delete the first, third, and fourth rows of the matrix in (a). Fill in the blanks in the answer:
(c)(4pt points) Insert a row of ones as the first row of the matrix in part (a):
Fill in the blanks in the answer:
1A=[ ; A];
(d)(6 points) Take the lower right 33 matrix from the matrix in (a) and assign the extracted matrix to a new matrix called B.
Fill in the blanks in the answer:
1B=ACq,
q,);
[ arrays ] Use arrays and array manipulation

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 Programming Questions!