Cody

Solution 2013852

Submitted on 11 Nov 2019 at 13:16 by William
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   Pass
P=[16,20]; Q=[41,120]; a=-1; b=3; p=127; y_correct = [86,81]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

2   Pass
P=[16,20]; Q=[16,20]; a=-1; b=3; p=127; y_correct = [97,81]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

3   Pass
P=[97,81]; Q=[97,81]; a=-1; b=3; p=127; y_correct = [57,10]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

4   Pass
P=[3,6]; Q=[80,10]; a=2; b=3; p=97; y_correct = [80,87]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

5   Pass
P=[1,2]; Q=[1,2]; a=-7; b=10; p=487; y_correct = [486,483]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

6   Pass
P=[1,2]; Q=[486,483]; a=-7; b=10; p=487; y_correct = [9,461]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))

7   Pass
P=[9,461]; Q=[9,461]; a=-7; b=10; p=487; y_correct = [285,417]; assert(isequal(pointAdd(P,Q,a,b,p),y_correct))