Question: 2. (35 pt) In the m-file template, a variable P has been defined as P = magic(3), and a variable T has been defined as

2. (35 pt) In the m-file template, a variable P has been defined as P = magic(3), and a variable T has been defined as T = [16, 49, 4] (a) Using T, the diagonal function, and the square root function, define a matrix named A to match the following: 4 0 0 A= 7 0 0 0 2 0 1 (b) Using A, define a matrix named B with each column of A sorted in descending order. (c) Using P and B, define a matrix named C by multiplying P to the transpose of B's 3rd row. (d) Using C, define a matrix D by replicating C, such that D has: Triple the amount of rows of C Double the amount of columns of C (e) Using T and D, find the indices of all elements in D that are less than the mean of T
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
