Python Forum
define a diagonal matrix from a matrix - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: define a diagonal matrix from a matrix (/thread-18391.html)



define a diagonal matrix from a matrix - amalalaoui - May-15-2019

I need a help plz I want to construct a diagonal matrix D from a matrix A the first element of the diagonal matrix D must be the product of all elements in the subdiagonal of the matrix A, the second element in the diagonal matrix D must be the product of all elements in the subdiagonal of the matrix A except the first one , the third element in the diagonal matrix D must be the product of all elements in the subdiagonal of the matrix A expect the first and the second one,.... , and the last element of the diagonal matrix D must be 1


RE: define a diagonal matrix from a matrix - ichabod801 - May-15-2019

What have you tried? We're not big on writing code for people here, but we would be happy to help you fix your code when you run into problems. When you do run into problems, please post your code in Python tags, and clearly explain the problem you are having, including the full text of any errors.