MATLAB Answers

[p,S] = polyfit(x,y,n); how to get S manually

4 views (last 30 days)
Sharah
Sharah on 17 Jan 2017
Answered: Jonathan Kwang on 24 Jan 2017
I am trying to get the value of S same as the output from polyfit so that I can calculate the value of confidence interval using the polyconf function
My problem is I am not using the polyfit function, instead I use my own regression function (Total Least Square) instead of OLS. Can somebody show me how to get the S manually?

  0 Comments

Sign in to comment.

Accepted Answer

Jonathan Kwang
Jonathan Kwang on 24 Jan 2017
You can view the code for the polyfit function by typing the following in the MATLAB command window: >> edit polyfit
Then by viewing how "S" is created you can try to copy or adapt this code to fit your use.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by