comparison scripts/general/logspace.m @ 2325:b5568c31ee2c

[project @ 1996-07-15 22:20:21 by jwe]
author jwe
date Mon, 15 Jul 1996 22:20:21 +0000
parents 949ab8eba8bc
children eac91893f3fc
comparison
equal deleted inserted replaced
2324:fdc6e2f81333 2325:b5568c31ee2c
22 ## Return a vector of n logarithmically equally spaced points between 22 ## Return a vector of n logarithmically equally spaced points between
23 ## x1 and x2 inclusive. 23 ## x1 and x2 inclusive.
24 ## 24 ##
25 ## If the final argument is omitted, n = 50 is assumed. 25 ## If the final argument is omitted, n = 50 is assumed.
26 ## 26 ##
27 ## All three arguments must be scalars. 27 ## All three arguments must be scalars.
28 ## 28 ##
29 ## Note that if if x2 is pi, the points are between 10^x1 and pi, NOT 29 ## Note that if if x2 is pi, the points are between 10^x1 and pi, NOT
30 ## 10^x1 and 10^pi. 30 ## 10^x1 and 10^pi.
31 ## 31 ##
32 ## Yes, this is pretty stupid, because you could achieve the same 32 ## Yes, this is pretty stupid, because you could achieve the same
44 elseif (nargin == 3) 44 elseif (nargin == 3)
45 if (length (n) == 1) 45 if (length (n) == 1)
46 npoints = fix (n); 46 npoints = fix (n);
47 else 47 else
48 error ("logspace: arguments must be scalars"); 48 error ("logspace: arguments must be scalars");
49 endif 49 endif
50 else 50 else
51 usage ("logspace (x1, x2 [, n])"); 51 usage ("logspace (x1, x2 [, n])");
52 endif 52 endif
53 53
54 if (npoints < 2) 54 if (npoints < 2)