MATLAB Answers

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

7 ビュー (過去 30 日間)
Sharah 2017 年 1 月 17 日
回答済み: Jonathan Kwang 2017 年 1 月 24 日
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?


Jonathan Kwang
Jonathan Kwang 2017 年 1 月 24 日
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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by