Cody

Solution 1960281

Submitted on 4 Oct 2019 by Paolo Rosa
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
p1=[1 2]; p2=[4 5]; p3=[-3 -8]; w=30; y_correct=4.5000; assert(isequal(round(areaTriangle(p1,p2,p3,w),4),y_correct))

J = 1.0000 1.0000 1.0000 1.0000 4.0000 2.5000 1.0000 -3.0000 -4.0000

2   Pass
p1=[-3 2]; p2=[6.5 9]; p3=[-7 -15]; w=56; y_correct=55.3383; assert(isequal(round(areaTriangle(p1,p2,p3,w),4),y_correct))

J = 1.0000 -3.0000 1.6581 1.0000 6.5000 7.4613 1.0000 -7.0000 -12.4356

3   Pass
p1=[-2,-12]; p2=[0,5]; p3=[15,20]; w=15; y_correct=29.1171; assert(isequal(round(areaTriangle(p1,p2,p3,w),4),y_correct))

J = 1.0000 -2.0000 -3.1058 1.0000 0 1.2941 1.0000 15.0000 5.1764

4   Pass
p1=[0,0]; p2=[3,0]; p3=[3,4]; w=90; y_correct=6; assert(isequal(round(areaTriangle(p1,p2,p3,w),4),y_correct))

J = 1 0 0 1 3 0 1 3 4