[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is this a bug?
From: |
John W. Eaton |
Subject: |
Re: is this a bug? |
Date: |
Wed, 2 Jul 1997 09:07:13 -0500 |
On 2-Jul-1997, Mario Storti <address@hidden> wrote:
| Vu Nguyen-Cong <address@hidden> writes:
|
| > The following is what I did with octave-2.0.8 on Linux
| >
| > z = [
| > 1 0 0
| > 1 0 0
| > 0 1 0
| > 0 1 0
| > 0 0 1
| > 0 0 1
| > ];
| >
| > z(:, any(z))
| >
| > ans =
| >
| > 1 1 1
| > 1 1 1
| > 0 0 0
| > 0 0 0
| > 0 0 0
| > 0 0 0
| >
| > Vu Nguyen-Cong
| > address@hidden
|
| I think it's OK. any(z) is [1 1 1] and Octave understands z(:,[1 1 1])
| as [z(:,1) z(:,1) z(:,1)].
If you set prefer_zero_one_indexing to 1, Octave will return the
original matrix for this example. Is that what you were expecting?
The next major release of Octave will have a boolean type that will
eliminate this ambiguity and the need for the prefer_zero_one_indexing
variable.
jwe