Problem 42840. Coefficients and vertex of a parabola given 3 points
Given 3 points, each defined by x and y, compute the coefficients: [a,b,c] of a parabola with equation: y = ax^2 + bx + c passing through those points. Also solve for the location of its vertex: [xv,yv].
Example:
Inputs: D = [0 3]; E = [1 6]; F = [-1 2] Outputs: C = [1 2 3]; V = [-1 2] Hence, the quadratic equation is: y = x^2 +2x + 3, with vertex at (-1,2)
Solution Stats
Problem Comments
-
2 Comments
Peng Liu
on 29 Apr 2016
It would be better to add more test cases to reinforce the test suite.
Roche de Guzman
on 1 May 2016
Thanks I just updated!
Solution Comments
Show commentsProblem Recent Solvers21
Suggested Problems
-
317 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2534 Solvers
-
115 Solvers
-
Find Index of maximum Value and maximum Value of a vector
167 Solvers
-
How long do each of the stages of the rocket take to burn?
450 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!