octave-maintainers
[Top][All Lists]
Advanced

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

Re: Diagonal v. sparse matrices [was Re: deprecated functions]


From: Jaroslav Hajek
Subject: Re: Diagonal v. sparse matrices [was Re: deprecated functions]
Date: Wed, 4 Mar 2009 21:39:29 +0100

On Wed, Mar 4, 2009 at 9:33 PM, John W. Eaton <address@hidden> wrote:
> On  4-Mar-2009, Jaroslav Hajek wrote:
>
> | But why, by heaven? What's so wrong with diag(sparse(vector))?
>
> Nothing.  I just didn't realize that diag would generate a sparse
> matrix.  I was thinking that it would only generate a diagonal matrix
> object.
>
> jwe
>

Nope, I didn't break compatibility that much :) This is, in fact, the
standard Matlab way to create a sparse diagonal matrix. It would be
nice, however, to be able to write this as sparse(diag()) as well
without losing efficiency. It seems Jason is working on something
along that lines, so I'd leave it to him. Note that the proper
constructors are already defined in liboctave.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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