Cody

# Problem 769. Calculate the area of a triangle between three points

Solution 1793084

Submitted on 19 Apr 2019 by Nicolas
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
X=[1 0 0]; Y=[0 0 1]; y_correct = 0.5; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

u12 = -1 0 u13 = -1 1 a = 1 vh = 0 1 h = 1 dbg = 0 y = 0.5000

2   Pass
X=[1 1.5 2]; Y=[0 1 0]; y_correct = 0.5; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

u12 = 0.5000 1.0000 u13 = 1 0 a = 1.1180 vh = 0.8000 -0.4000 h = 0.8944 dbg = 5.5511e-17 y = 0.5000

3   Pass
X=[2 3 1]; Y=[0 3 4]; y_correct = 3.500; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

u12 = 1 3 u13 = -1 4 a = 3.1623 vh = -2.1000 0.7000 h = 2.2136 dbg = 8.8818e-16 y = 3.5000

4   Pass
X=[10 12 -10]; Y=[-7 -3 -47]; y_correct = 0; assert(abs(your_fcn_name(X,Y)-y_correct)<1e-3)

u12 = 2 4 u13 = -20 -40 a = 4.4721 vh = 0 0 h = 0 dbg = 0 y = 0