Cody

# Problem 417. Covering area

Solution 1843708

Submitted on 9 Jun 2019 by John Simpson
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.4564 0.1088 0.1740 0.0413 y = 1.0000 -2.0000 1.0000 -2.0000 -1.0000 0 -0.0328 -0.4299 0.1664 -0.0732 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.0488 0.1331 0.1382 -0.2829 -0.0662 0.0054 0.2334 -0.0556 -0.0796 0.3803 y = 1.0000 -2.0000 1.0000 -2.0000 4.0000 -0.4146 0.1573 -0.1479 -0.0924 0.4531 0.0381 -0.0468 -0.1275 0.3596 0.2257 y_correct = 12

### Community Treasure Hunt

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

Start Hunting!