[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
all() & sparse()
From: |
Jeremy Reynolds |
Subject: |
all() & sparse() |
Date: |
Wed, 1 Jul 2009 23:06:07 -0700 (PDT) |
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?
--
View this message in context:
http://www.nabble.com/all%28%29---sparse%28%29-tp24301687p24301687.html
Sent from the Octave - General mailing list archive at Nabble.com.
- all() & sparse(),
Jeremy Reynolds <=