[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linspace
From: |
Shengchao Li |
Subject: |
Re: linspace |
Date: |
Mon, 16 Apr 2001 10:27:50 -0400 (EDT) |
Well, in my computer (Octave2.0.16 on Redhat 7.0) there is no such
problem.
octave:2> linspace(0,10,10)'
ans =
0.00000
1.11111
2.22222
3.33333
4.44444
5.55556
6.66667
7.77778
8.88889
10.00000
shengchao
On Mon, 16 Apr 2001, Yvan Lengwiler wrote:
> I am a complete novice to Octave. I have used Gauss before, however.
> Going through the help files of the Octave website, one of the first
> functions I came across was linspace. Now, I am somewhat confused by the
> behavior of this function.
>
> linspace(0,10,11)' produces, as expected,
>
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
>
> but linspace(0,10,10)' produces
>
> 0.00000
> 0.11111
> 0.22222
> 0.33333
> 0.44444
> 0.55556
> 0.66667
> 0.77778
> 0.88889
> 1.00000
>
> I would have expected
>
> 0.00000
> 1.11111
> 2.22222
> 3.33333
> 4.44444
> 5.55556
> 6.66667
> 7.77778
> 8.88889
> 10.00000
>
> Is this a bug?
>
> Yvan
>
> PS: I use the binaries of Octave version 2.1.31 on a WinNT computer.
>
>
>
>
> -------------------------------------------------------------
> 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
-------------------------------------------------------------
- linspace, Yvan Lengwiler, 2001/04/16
- Re: linspace,
Shengchao Li <=