Cody

Solution 1932691

Submitted on 12 Sep 2019 by ngoc anh pham
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.0413 0.2878 0.1086 0.0294 y = 1.0000 -2.0000 1.0000 -2.0000 -1.0000 0 -0.1456 -0.1205 0.2694 -0.2607 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.3295 -0.2232 -0.4790 0.0058 -0.0655 -0.0521 0.1879 0.5145 0.1921 0.0302 y = 1.0000 -2.0000 1.0000 -2.0000 4.0000 -0.2449 -0.2110 -0.0858 0.4474 -0.0578 0.3744 -0.0436 0.1653 0.0789 -0.0668 y_correct = 12

Suggested Problems

More from this Author3