logarithmicSpaced function
Generates a Vector with a sequence of count
evenly spaced values on a
log scale (a geometric progression) on the interval between base ^ start
and base ^ stop
.
Implementation
Vector<double> logarithmicSpaced(
double start,
double stop, {
int count = 10,
double base = 10.0,
bool includeEndpoint = true,
DataType<double>? dataType,
VectorFormat? format,
}) {
final linear = linearSpaced(start, stop,
count: count, includeEndpoint: includeEndpoint, dataType: dataType);
final logarithmic = linear.map((i, x) => pow(base, x).toDouble(), dataType);
return format == null ? logarithmic : logarithmic.toVector(format: format);
}