octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About diagonal matrices


From: John W. Eaton
Subject: Re: About diagonal matrices
Date: Sun, 22 Feb 2009 11:07:25 -0500

On 22-Feb-2009, Jaroslav Hajek wrote:

| 1. Leave the assumed zeros treatment. Document it (I'm working on this)

OK, after seeing your arguments and thinking about it a bit more, I
agree that we should do this if

  * There is no way for an operation involving a diagonal matrix to
    wipe out an existing NaN value.  This is different from what we
    have been talking about (generating NaN values with full matrix
    operations vs. not generating them at all with a diagonal matrix
    becuase the operations are skipped).  If you already have a NaN
    value, I think you want to have it propagated through other
    calculations.  I can't come up with any examples, and given that
    you have apparently already taken care of cases like

      diag ([1, 2]) ./ [1, 0; 3, 4]

    I assume you thought about this problem.

  * There is a function to coerce a full matrix to a diagonal matrix.
    It should require that all off-diagonal elements are numerically
    zero.  This is not the same as the current diag function.

  * We do not implement automatic conversion from full to diagonal or
    full to sparse.

Does that seem reasonable?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]