[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Create a logical array of 0
From: |
David Bateman |
Subject: |
Re: Create a logical array of 0 |
Date: |
Fri, 3 Sep 2004 17:42:10 +0200 |
User-agent: |
Mutt/1.4.1i |
According to Josep Monés i Teixidor <address@hidden> (on 09/03/04):
> On dv, 2004-09-03 at 16:48, David Bateman wrote:
> > Ok, this is a bug I introduced in the week before release. The problem
> > is here.
> >
> > x = a * ones(idx, class(a))
> >
> > as with the previously zeros(m,n,"logical") issue, ones(m,n,"logical")
> > isn't defined!!!
>
> In this case (like in zeros) do you think it would be harmless to break
> compatibility a bit and accept zeros(m,n,"logical") ? Since it's an
> addition it's not the same as other imcompataibilities (is more like
> "embrace and extend" hehe)
>
> I can't see why MATLAB lacks of this. It to me as an overlook by MATLAB
> developers (or perhaps they don't want people to use a lot logical
> arrays?).
If their logical arrays are doubles this is probably exactly the point...
> > A workaround for your case is repmat([false, false],10,5);
>
>
> octave:74> m=repmat([false, false],10,5);
> octave:75> whos m
>
> *** local user variables:
>
> Prot Name Size Bytes Class
> ==== ==== ==== ===== =====
> rwd m 10x10 800 matrix
>
> Total is 100 elements using 800 bytes
Yeah, I said it cast it as double.... Working on a patch that addresses
all of this. Wait a couple of minutess...
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Create a logical array of 0, Josep Monés i Teixidor, 2004/09/03
- Re: Create a logical array of 0, Josep Monés i Teixidor, 2004/09/03
- Re: Create a logical array of 0, David Bateman, 2004/09/03
- Re: Create a logical array of 0, John W. Eaton, 2004/09/03
- Re: Create a logical array of 0, David Bateman, 2004/09/03
- Re: Create a logical array of 0, David Bateman, 2004/09/03
- Re: Create a logical array of 0, John W. Eaton, 2004/09/03
RE: Create a logical array of 0, Randy Gober, 2004/09/03
Re: Create a logical array of 0, David Bateman, 2004/09/03