help-octave
[Top][All Lists]
Advanced

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

linspace


From: Yvan Lengwiler
Subject: linspace
Date: Mon, 16 Apr 2001 15:39:48 +0200

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



reply via email to

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