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: Wed, 23 Nov 2005 07:24:00 -0800

Pedro,

In octave, two arguments...
 z = (1:100)/10

or, three arguments...
 Z = (1:0.1:10)
...give identical z arrays, but the increment is STILL
placed between the start and finish.  Going from two
arguments to three, one inserts the increment between.

I believe it is just one of those items that happened and
now it's a case of "live with it".  Which is fine, there is
no REAL reason to change it.  

         - Robert -

On Wed, 23 Nov 2005 08:53:16 +0100
 Pedro Antonio Fructuoso Merino <address@hidden>
wrote:
> Hi,
> Robert A. Macy escribió:
> 
> >Just curious, why is the order of the arguments...
> >  Range r (0.0, 10.0, 0.1);  // base, limit, increment
> >...and not...
> >  Range r (0.0, 0.1, 10.0);  // base, increment, limit
> >...to keep a similar order of arguments in octave's...
> >  z = [ 0 : 0.1 : 10 ] 
> >...?
> >  
> >
> I think that it has this order because you can do
>     Range r (0.0, 10.0);  // base, limit,without
> increment
> so when yo do
>     Range r (0.0,10.0, 0.1);
> is more natural put the increment to the end.
> Regards,
>     Pedro
> 



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