Probability - Linear Regression

조회 수: 8 (최근 30일)
Gulfstream Gaming
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
Gulfstream Gaming
Gulfstream Gaming 2019년 1월 21일
@Stephan, Thanks for pointing out the mistake, I just noticed it. Thanks for the links for me to read as well. Appreciate it a lot. See you around!
Gulfstream Gaming
Gulfstream Gaming 2019년 1월 22일
@Torsten, thanks for the hint, will appreciate it a lot. :)
See you around

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
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
Gulfstream Gaming
Gulfstream Gaming 2019년 1월 21일
@Star Strider, yup, i have both. Thanks for providing me the link. Appreciate it a lot. See you around! I like your profile photo
Star Strider
Star Strider 2019년 1월 21일
As always, my pleasure.
My polar bear thanks you for the compliment!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by