Question: 11. Write a function which takes as input a vector of length n2 and outputs a matrix of dimension n n with the same elements,
11. Write a function which takes as input a vector of length n2 and outputs a matrix of dimension n n with the same elements, filled in line by line. For instance, for v 1,2,3,4,5,6,7,8,9), the output should be A- 4 5 12. Write a function which take as parameter a square matrix and returns a matrix with all all the elements below the diagonal 0, and the rest of the elements equal to the corresponding elements of the original matrix. E.G, for the matrix [1 2 3 4 5 6 the result should be05 6 10 0 9 2 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
