Search for question
Question

2. Consider the following matrices: a = [0 1 0] b = 2 6 C = 3 4 10 71 -5 2 L-2 3 2 d = 5 Perform the following operations. a. Create a new matrix z by dot multiplying c with c'. b. Sort the rows of z in ascending order according to column two such that each row retains its original values. The resulting matrix should be assigned to z. c. Divide every element in z by d. Store the result in z. d. Find the dot product of a and b. You should get a single value. Store the result in a new variable, and call it e. e. Replace the diagonal of z with e. You must use the diag() function to complete this step. Store the result in z.

Fig: 1