MATLAB Answers

Thar
0

How can i find uncertainty of coefficients ?

Asked by Thar
on 7 Nov 2015
Latest activity Answered by Star Strider
on 7 Nov 2015
Hi all!
I have my data (x,y) and I plot these. Then I will do linear regression like:
p=polyfit(x,y,1);
yfit=polyval(p,x);
plot(x,y,'ob',x,yfit,'r');
gtext(['y=',num2str(p(1)),'x',num2str(p(2))])
I want to find the errors (or uncertainty) of coefficients a and b of the linear regression y=ax+b. How can i do this?
Thank you!

  0 Comments

Sign in to comment.

1 Answer

Answer by Star Strider
on 7 Nov 2015

Since you’re using polyfit, use my FEX submission polyparci.

  0 Comments

Sign in to comment.