Functions > Vector and Matrix > Creating and Subdividing Arrays > Logarithmically Spaced Points
Logarithmically Spaced Points
logpts(minexp, dec, dnpts)—Returns a vector spanning dec decades of evenly-spaced points, starting at 10 minexp, with dnpts intervals per decade. The number of elements in the resulting vector is dec · dnpts.
The logpts function uses the first value in each decade as the first point, and does not produce the first value of the following decade. So, for example, logpts(-1, 1, 9) generates the sequence of values [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], and does not include the value 1, which is the start of the next decade.
logspace(min, max, npts)—Returns a vector of npts logarithmically-spaced points starting at min, ending at max.
Arguments
minexp is the real exponent corresponding to the power of 10 at which the vector elements generated by logpts begins.
dec is a positive integer.
npts, dnpts are positive integers representing the total number of points and the points per decade respectively.
min, max are positive, real numbers. They must have compatible units.
Was this helpful?