Login
Login

Re: create a diagonal matrix

Home 21090308 Forums Re: create a diagonal matrix

#1971
haksunli
Keymaster

From any [tt:v42epeki]DenseMatrix[/tt:v42epeki] A, you can create the identity matrix by calling

If you don’t already have a matrix but know the dimension, you can do

To create a diagonal matrix from another matrix A, you can do