Errors for the slope and intercept

9 views (last 30 days)
Marisabel Gonzalez
Marisabel Gonzalez on 3 Dec 2018
Answered: Star Strider on 3 Dec 2018
How can I get the uncertainty for the slope and intercept when using this code
Const = polyfit(log10(x),log10(y), 1);
m = Const(1);
k = Const(2);
b_fit = (10^k) * (x.^m4);

Answers (2)

Walter Roberson
Walter Roberson on 3 Dec 2018
use the two output form of polyfit and the two output form of polyval
  3 Comments
Walter Roberson
Walter Roberson on 3 Dec 2018
okay so when you call polyval pass in log10 of the x locations and the second output will reflect that log space .

Sign in to comment.


Star Strider
Star Strider on 3 Dec 2018
Consider the File Exchange contribution polyparci (link).

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!