Calculating the gradient of a logarithmic scale

In summary, when using a logarithmic graph to plot data in Matlab, the gradient of the line can be found by taking the log of the original numbers and dividing the log of the error by the log of NX. The log-log plot uses a logarithmic scale for both the x and y axes, and if it is a straight line through the origin, the gradient can be found by taking the log of both the x and y values. The data given appears to follow the form of plotERRLW = NX^(alpha).
  • #1
blizzard12345
14
0

Homework Statement



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



Homework Equations



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



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
 
Physics news on Phys.org
  • #2
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].
 

1. How do you calculate the gradient of a logarithmic scale?

To calculate the gradient of a logarithmic scale, you need to take the difference between the y-values of two points and divide it by the difference between the corresponding x-values. This will give you the slope of the line on the logarithmic scale.

2. What is the significance of calculating the gradient of a logarithmic scale?

Calculating the gradient of a logarithmic scale allows you to determine the rate of change for data that is exponentially increasing or decreasing. This can provide valuable insights and help in making predictions or analyzing trends.

3. Can the gradient of a logarithmic scale be negative?

Yes, the gradient of a logarithmic scale can be negative. This indicates that the data is decreasing at a decreasing rate, or in other words, the rate of decrease is slowing down.

4. How do you interpret the gradient of a logarithmic scale?

The gradient of a logarithmic scale represents the rate of change of the data. A larger gradient indicates a steeper slope and a faster rate of change, while a smaller gradient indicates a gentler slope and a slower rate of change.

5. Is there a specific formula for calculating the gradient of a logarithmic scale?

Yes, the formula for calculating the gradient of a logarithmic scale is (y2 - y1) / (log(x2) - log(x1)), where y1 and y2 are the y-values of two points and x1 and x2 are the corresponding x-values.

Similar threads

  • General Math
Replies
2
Views
9K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
  • Other Physics Topics
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
792
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • General Math
Replies
7
Views
970
Replies
1
Views
927
  • General Math
Replies
15
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Replies
4
Views
3K
Back
Top