68 views (last 30 days)

Show older comments

David Goodmanson
on 11 Jul 2017

Edited: Walter Roberson
on 12 Jul 2017

Hello Cameron, If you have a linear fit in the logs,

log(y) = (-11/3)log(x) + A

then exponentiate both sides:

y = x^(-11/3) exp(A)

and with C = exp(A), the fitting line (linear on loglog plot) is

y = C*x.^(-11/3)

where you just have to provide C. C could come from the same theory that gives the -(11/3), in which case you have a fit with no adjustable parameters, nice if it works. Or you could calculate C by using one (x,y) data point, or you could fit A from the first equation by taking the difference between log(y) and (-11/3)*log(x), and averaging that difference over all the values to get A. Then C = exp(A).

If you prefer log base 10, then replace log by log10 and C = exp(A) by C = 10^A everywhere.

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!