Probability - Linear Regression
8 ビュー (過去 30 日間)
古いコメントを表示
Gulfstream Gaming
2019 年 1 月 21 日
コメント済み: Gulfstream Gaming
2019 年 1 月 22 日
Can I get some help for this question?

Below is my attempt
x=[1 3 5 9 11 13];
y=[22 51 127 202 227 248 252];
scatter(x,y)
That is the furthest I can go. Any help would be appretiated. :)
4 件のコメント
採用された回答
Star Strider
2019 年 1 月 21 日
編集済み: Star Strider
2019 年 1 月 21 日
I don’t know if you have the Optimization Toolbox or the Statistics and Machine Learning Toolbox, both of which have nonlinear regression functions. One function everyone has is fminsearch (link).
To use it, you will need to optimise a function of the form:
fcn = @(b) norm(y - Hfcn(b,t));
where ‘Hfcn’ is the function you will write for ‘H(t)’, ‘b’ is the parameter vector, and ‘t’ and ‘y’ are the respective data vectors.
I leave the rest to you!
EDIT —
Your ‘t’ vector is also missing a value. It should be:
t=[1 3 5 7 9 11 13];
I discovered that when I actually did the regression.
2 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!