Cody

Solution 799848

Submitted on 31 Dec 2015 by Ron
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
%% A = [1 2; 12 3; 6 7]; y_correct = 25; assert(isequal(area_of_polygon(A),y_correct))

B = 1 2 12 3 6 7 1 2 y = 25

2   Pass
%% A = [0 0;200 100;500 500;400 1000;100 300;-100 100;-300 -200]; y_correct = 230000; assert(isequal(area_of_polygon(A),y_correct))

B = 0 0 200 100 500 500 400 1000 100 300 -100 100 -300 -200 0 0 y = 230000

Suggested Problems

More from this Author1