Python Forum

Full Version: define a diagonal matrix from a matrix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.