help-octave
[Top][All Lists]
Advanced

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

Re: all() & sparse()


From: Jaroslav Hajek
Subject: Re: all() & sparse()
Date: Fri, 3 Jul 2009 13:14:37 +0200

On Thu, Jul 2, 2009 at 8:06 AM, Jeremy
Reynolds<address@hidden> wrote:
>
> Hi all,
>
> I'm curious if anyone else has noticed an odd behavior for the all()
> function with sparse matrices. Basically, it appears to be broken for small
> matrices (which I realize is atypical use for the use of sparse).
>
> For example, just taking the simple case:
>
> all([1 0]) returns 0 as it should, but
> all(sparse([1 0])) also returns 1
>
> This doesn't just apply to vectors, but also to matrices:
> all([1 0; 1 0; 0 1;]) returns [0 0], and
> all([1 0; 1 0; 0 1;],2) returns [0 0 0]',
> but:
> all(sparse([1 0; 1 0; 0 1;])) returns [1 0]
>
> (all(sparse([1 0; 1 0; 0 1;]),2) returns the appropriate column vector)
>
> This is with octave 3.2, tested both with the mac OS X binary, as well as a
> source install on a kubuntu box.
>
> Am I just missing something, and has anyone else seen this behavior?
>

Please try
http://hg.savannah.gnu.org/hgweb/octave/rev/5d46c4a894e8

I've made this a last minute fix for 3.2.1.

thanks

-- 
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]