Parabolic regression problem

how do you find a b and c in parabolic regression? like in this expression: y= -0.20x^2 + 1.94x + 2.78, how do you get 0.20 1.94 and 2.78??

 Akzeptierte Antwort

bym
bym am 21 Aug. 2011

1 Stimme

A = [ones(size(x)), x, x.^2];
abc = A\y;

4 Kommentare

Dwyane  Wade
Dwyane Wade am 21 Aug. 2011
do you know how to get it in real linear algebra? I mean manually? Without using matlab. I kinda need to know how to...
Jan
Jan am 21 Aug. 2011
@Francis: The method to do this manually is exactly the same as proecsm's solution. You have top solve the same system of equations, but manually.
Dwyane  Wade
Dwyane Wade am 22 Aug. 2011
what does ones and size mean then?
Jan
Jan am 22 Aug. 2011
@Francis: Please read the Getting Started chapters in the documentation for such basic questions. "help size" and "help ones" are helpful also, as for all other MATLAB commands.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by