0
$\begingroup$

Suppose some function y[x]. I need to calculate the table of the value of this function with the logarithmic step of the coordinate, i.e., the operation which corresponds to the Mathematica's command LogPlot. Could you please tell me how to do this?

$\endgroup$
  • 2
    $\begingroup$ It would be useful to add code you have tried e.g. defining a representative y[x],step size and range. $\endgroup$ – Daniel Lichtblau Oct 7 '17 at 15:10
1
$\begingroup$

Something like this?

f[x_] := x^2;
With[{x := 10^xp}, Table[{x, f[x]}, {xp, 0, 5}]]

{{1, 1}, {10, 100}, {100, 10000}, {1000, 1000000}, {10000, 100000000}, {100000, 10000000000}}

$\endgroup$
  • $\begingroup$ It seems that this is exactly what I need. Thank you! $\endgroup$ – John Taylor Oct 7 '17 at 16:23
  • 1
    $\begingroup$ Or, for simplicity/brevity, {10^#, f[10^#]} & /@ Range[0, 5] would get the same result. $\endgroup$ – aardvark2012 Oct 8 '17 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.