Functions > Vector and Matrix > Creating and Subdividing Arrays > Example: Creating a Vector of Logarithmically Spaced Points
Example: Creating a Vector of Logarithmically Spaced Points
Use logpts and logspace functions to create vectors with logarithmically spaced points.
1. Use logpts to get a list of logarithmically spaced points.
The first argument specifies the start point of the vector. The last argument specifies the amount of points per decade. The second argument is multiplied by the last argument to set the number of elements in the vector.
In this example, logpts lists all the points between 1 (100) and 1000 (103) in logarithmic intervals. For each decade, 5 points are listed. The vector has 15 elements, created by multiplying 5 elements per decade times 3.
 1000 is not listed in the vector.
2. Use logspace to get a vector of logarithmically spaced points, by defining the minimal and maximal values.
In this example, logspace lists 10 points between 1 and 200 in logarithmic intervals.
 Both minimum and maximum values are listed in the vector.