Hi,
I've used some time ago a logarithmically spaced vector on 32 bands with Math.E logarithm base.
There was a need in specifying min/max values within the vector, the logarithm base (Math.E is a standard choice, and the number of points)
private static void GenerateLogSpace(int min, int max, int logBins)
{
double logarithmicBase = Math.E;
double logMin = Math.log(min);
double logMax = Math.log(max);
double delta = (logMax - logMin) / logBins;
int[] indexes = new int[logBins + 1];
double accDelta = 0;
float [] v = new float[logBins];
for (int i = 0; i <= logBins; ++i)
{
v[i] = (float) Math.pow(logarithmicBase, logMin + accDelta);
accDelta += delta;
}
}
Regards