Google
 
Web unafbapune.blogspot.com

Saturday, September 08, 2012

 

PS 2.3 P17: solving parabola via matrix

The parabola:

y = ax + bx + cx^2
goes through the points:
(x,y) = (1,4), (2,8), and (3,14)
Find and solve a matrix equation for the unknowns (a, b, c)





== Solution ==

Given:
a + b + c = 4 a + 2b + 4c = 8 a + 3b + 9c = 14
Representing these equations as matrix in Octave:
A = [1 1 1; 1 2 4; 1 3 9] b = [4; 8; 14]
Solving x for Ax = b:
A\b
Outputs:
2 1 1
which means:
a=2, b=1, c=1

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?