logspace
Vector of logarithmically (base-10) spaced points.
Syntax
Section titled “Syntax”y = logspace(a, b)y = logspace(a, b, n)Description
Section titled “Description”Returns a row vector of n values logarithmically spaced between 10^a and 10^b (both inclusive). Default n is 100. Equivalent to 10 .^ linspace(a, b, n).
Useful for sampling parameter sweeps that span many orders of magnitude — frequencies, regularization strengths, etc.
Examples
Section titled “Examples”logspace(0, 3, 4) % [1 10 100 1000]logspace(-3, 3, 7) % [1e-3 1e-2 0.1 1 10 100 1e3]See also
Section titled “See also”linspace— Vector of equally spaced points between two endpoints.