help-octave
[Top][All Lists]
Advanced

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

Re: Question about Range class


From: Robert A. Macy
Subject: Re: Question about Range class
Date: Fri, 25 Nov 2005 12:55:03 -0800

Aaaarrrrrggggg!!!!
  > z = (10:100)/10;
oops

Ah, the advantages of being so certain one is correct that
checking is not required.  

                - Robert -

On Fri, 25 Nov 2005 10:58:29 -0800
 "Henry F. Mollet" <address@hidden> wrote:
> [~] -bash-2.05b 501$ octave
> GNU Octave, version 2.1.71 (powerpc-apple-darwin8.1.0).
> octave:1> z = (1:100)/10;
> octave:2> Z = (1:0.1:10);
> octave:3> max(abs(z-Z))
> error: operator -: nonconformant arguments (op1 is 1x100,
> op2 is 1x91)
> error: evaluating binary operator `-' near line 3, column
> 10
> error: evaluating argument list element number 1
> error: evaluating argument list element number 1
> octave:3> whos
> 
>   Prot Name            Size                     Bytes
>  Class
>   ==== ====            ====                     =====
>  =====
>    rwd Z               1x91                        24
>  range
>    rw- __nargin__      1x1                          8
>  scalar
>    rwd z               1x100                      800
>  matrix
> 
> Z and z have different sizes in my octave version.
> Henry
> 
> on 11/25/05 9:40 AM, Miroslaw Kwasniak at
> address@hidden wrote:
> 
> > On Wed, Nov 23, 2005 at 07:24:00AM -0800, Robert A.
> Macy wrote:
> >> Pedro,
> >> 
> >> In octave, two arguments...
> >>  z = (1:100)/10
> >         ^
> >         10 
> >> or, three arguments...
> >>  Z = (1:0.1:10)
> >> ...give identical z arrays,
> > 
> > No, it's almost impossible
> > 
> > max(abs(z-Z))
> > ans =  1.7764e-15
> > 
> > ;)
> > 
> > 
> > 
> >
>
-------------------------------------------------------------
> > 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
> >
>
-------------------------------------------------------------
> > 
> 
> 
> 
> 
>
-------------------------------------------------------------
> 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
>
-------------------------------------------------------------
> 



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



reply via email to

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