Cody

# Problem 42840. Coefficients and vertex of a parabola given 3 points

Solution 1899049

Submitted on 13 Aug 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
P1 = [1 0]; P2 = [2 5]; P3 = [-1 2]; abc = [2 -1 -1]; O1 = Para3(P1,P2,P3); assert(isequal(O1,abc))

Assertion failed.

2   Fail
P1 = [1 0]; P2 = [2 5]; P3 = [-1 2]; vxvy = [0.25 -1.125]; [~,O2] = Para3(P1,P2,P3); assert(isequal(O2,vxvy))

Assertion failed.

3   Fail
i = [0 0]; j = [1 1]; k = [-1 1]; abc = [1 0 0]; tip = [0 0]; [Res,Ans] = Para3(i,j,k); assert(isequal(Res,abc)) assert(isequal(Ans,tip))

Assertion failed.

4   Fail
ptA = [-1 -5]; ptB = [2 4]; ptC = [3 -5]; exp1 = [-3 6 4]; exp2 = [1 7]; [coefficients,vertex] = Para3(ptA,ptB,ptC); assert(isequal(exp1,coefficients)) assert(isequal(exp2,vertex))

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!