MATLAB Answers

How can I extrapolate the value for the slope of the line?

12 views (last 30 days)
birdnerd007
birdnerd007 on 10 Jan 2020
Edited: Matt J on 10 Jan 2020
I have a loglog plot with a line that contains 5 data points. Is there a way to extrapolate the value of the slope of the line? The slope of the line is the value I need for my equation. Thanks in advanced for your help.

  3 Comments

Adam Danz
Adam Danz on 10 Jan 2020
This is linear in log scale so you can follow Matt J's advice by using polyfit and log transforms.
birdnerd007
birdnerd007 on 10 Jan 2020
Thanks Adam, I realized I posted the wrong graph, but it looks nearly the same.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 10 Jan 2020
Edited: Matt J on 10 Jan 2020
You could do,
p=polyfit(log(x),log(y),1);
slope=p(1);

More Answers (0)

Sign in to answer this question.


Translated by