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

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

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