The confusion is pretty clear. Someone suggested code like m = m + lambda*eye(m)
when eye(m) shouldn't be used there. And if lambda is a vector of eigenvalues, eye(m) still shouldn't be used there and instead the Diagonal should be used. So if you shouldn't be using this command, why should it still exist? Or why should it not default to one of the commands you should use? On Monday, August 29, 2016 at 8:31:13 AM UTC-7, Kristoffer Carlsson wrote: > > What is the confusion? Use eye(n) if you want a dense identity matrix. Use > I if you want something that acts like an identity element. Use > Diagonal(ones(n)) if you want a diagonal identity matrix. I see no reason > at all why eye should be changed. > > On Monday, August 29, 2016 at 4:32:34 PM UTC+2, Chris Rackauckas wrote: >> >> But you don't want a sparse matrix. It would not be an efficient way to >> actually use it since sparse matrices have a bit of overhead due to their >> table structure. Even better would be a Diagonal since it's just an array >> with dispatches to act like a diagonal matrix. But best would be to use the >> UniformScaling operator `I` which acts like eye in cases like A-λI but >> isn't actually saving a matrix and doesn't actually require iterating over >> two arrays at once. I think that amount of confusion in this thread is a >> good indicator that eye should be changed. >> >> On Monday, August 29, 2016 at 7:25:49 AM UTC-7, Kristoffer Carlsson wrote: >>> >>> You mean a sparse matrix? >> >>
