1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Calculating the gradient of a logarithmic scale

  1. Apr 12, 2012 #1
    1. The problem statement, all variables and given/known data

    hi i have the folowing data i would like to plot in matlab

    plotERRLW =

    0.0466 0.0111 0.0074 0.0046
    NX =

    50 500 1000 2000
    i am using a logarithmic graph to gain a straight line, if i wished to find the gradient of the line would i use the change in the original numbers or change in the numbers after i have taken a log of them?

    (also if i have to take a log of them what base does loglog naturally plot)

    i have tried a number of options already but can't seem to get the correct answer (i know it should be close to 2) thanks in advance

    2. Relevant equations

    i believe the data is of the form plotERRLW = NX^(alpha)

    3. The attempt at a solution

    so far i have been taking the log base 10 of the numbers in question and simply dividing the log of the error with the log of NX

    thanks in advance kyle
  2. jcsd
  3. Apr 12, 2012 #2


    User Avatar
    Science Advisor

    A log plot of (x, y) is a plot of (x, log(y)). If it is a straight line, they you are saying that log(y)= ax+b so that [itex]y= e^{ax+b}= e^be^{ax}=Ce^{ax}[/itex], a general exponential function.

    A "log-log" plot of (x, y) is a plot of (log(x), log(y)). If a log-log plot gives a straight line through the origin, then log(y)= a log(x) so that [itex]y= x^a[/itex].
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook