Cody

# Problem 417. Covering area

Solution 2998465

Submitted on 27 Sep 2020 at 17:17
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   Fail
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 s = 0

Assertion failed.

2   Fail
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.0136 0.0905 0.3215 -0.2308 y = 1.0000 -2.0000 1.0000 -2.0000 -1.0000 0 0.2074 0.1550 -0.2308 0.2087 s = 0.0676

Assertion failed.

3   Fail
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.0922 -0.1400 0.0361 -0.2496 0.3184 0.0807 0.2674 0.1989 0.1154 -0.0194 y = 1.0000 -2.0000 1.0000 -2.0000 4.0000 -0.1267 0.1460 -0.1495 0.0447 -0.0321 -0.1925 -0.1103 0.2530 -0.1389 -0.0295 s = 0.1207

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!