Problem 44972. Area of Triangle with Oblique Coordinates

Solution 2593600

Submitted on 21 Jun 2020 by ChrisR
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

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))

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))

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))

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))

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!