Help with fitting linear equation

18 ビュー (過去 30 日間)
Mirelys Llana
Mirelys Llana 2015 年 11 月 13 日
回答済み: Image Analyst 2015 年 11 月 13 日
I need help with my HW pls, I have a data set and I have to fit a linear equation on a given data to identify the intercept and the slope

回答 (4 件)

Sean de Wolski
Sean de Wolski 2015 年 11 月 13 日
>>doc polyfit

Thorsten
Thorsten 2015 年 11 月 13 日
help robustfit
the final exampel contains also a standard linear regression using "regress".

Star Strider
Star Strider 2015 年 11 月 13 日
And a third option:
B = [ones(size(x(:))) x(:)]\y(:);
slope = B(2)
intercept = B(1)

Image Analyst
Image Analyst 2015 年 11 月 13 日
See my attached polyfit demo that I have posted countless times.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by