comparison scripts/general/linspace.m @ 900:f8c8c2461f4d

[project @ 1994-11-09 18:39:40 by jwe]
author jwe
date Wed, 09 Nov 1994 18:39:40 +0000
parents 0ce34c2fc3d5
children 3470f1e25a79
comparison
equal deleted inserted replaced
899:00e903c95534 900:f8c8c2461f4d
31 31
32 if (nargin == 2) 32 if (nargin == 2)
33 npoints = 100; 33 npoints = 100;
34 elseif (nargin == 3) 34 elseif (nargin == 3)
35 if (length (n) == 1) 35 if (length (n) == 1)
36 npoints = n; 36 npoints = fix (n);
37 else 37 else
38 error ("linspace: arguments must be scalars"); 38 error ("linspace: arguments must be scalars");
39 endif 39 endif
40 else 40 else
41 error ("usage: linspace (x1, x2 [, n])"); 41 error ("usage: linspace (x1, x2 [, n])");