Cody

Solution 1933192

Submitted on 12 Sep 2019 by Binh Nguyen Cong
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 1; 1 -1; -1 1; -1 -1; 0 0]; y_correct = 4; assert(isequal(cover_area(x),y_correct))

x = 1 1 -1 -1 0 y = 1 -1 1 -1 0 y_correct = 4

2   Pass
x = [1 1; 1 -2; -2 1; -1 -2; 2 -1; -3 0; 0.2*randn(4,2)]; y_correct = 11; assert(isequal(cover_area(x),y_correct))

x = 1.0000 1.0000 -2.0000 -1.0000 2.0000 -3.0000 0.2766 -0.2006 0.2138 -0.0055 y = 1.0000 -2.0000 1.0000 -2.0000 -1.0000 0 0.1525 -0.0217 -0.2346 0.3166 y_correct = 11

3   Pass
x = [1 1; 1 -2; -1 1; -1 -2; 3 4; 0.2*randn(10,2)]; y_correct = 12; assert(isequal(cover_area(x),y_correct))

x = 1.0000 1.0000 -1.0000 -1.0000 3.0000 -0.1152 0.3922 0.0952 -0.0470 -0.1021 -0.2607 0.0535 0.1924 0.2284 -0.2162 y = 1.0000 -2.0000 1.0000 -2.0000 4.0000 -0.1752 0.0656 0.2751 0.0299 -0.0932 -0.0467 -0.1696 0.0437 0.1167 -0.1617 y_correct = 12

Suggested Problems

More from this Author3