Test  Status  Code Input and Output 

1  Fail 
L=linspace(0,2.*pi,9);
x = 1.2*cos(L)';
y = 1.2*sin(L)';
a_correct = 4.072935;
assert( abs(polygon_area(x,y)a_correct) < 1e04 )
A =
0
A =
1.0182
A =
2.0365
A =
3.0547
A =
4.0729
A =
5.0912
A =
6.1094
A =
7.1276
A =
8.1459

2  Fail 
x = (1:10)';
y = [0,ones(1,9)]';
a_correct = 4;
assert( isequal(polygon_area(x,y),a_correct) )
A =
0
A =
1
A =
0
A =
1
A =
2.0000
A =
3.0000
A =
4
A =
5
A =
6
A =
7

3  Fail 
x=[0,5,3]';
y=[0,0,9]';
a_correct = 22.5;
assert( abs(polygon_area(x,y)a_correct) < 1e04 )
A =
0
A =
0
A =
45

4  Fail 
x=[0,5,3,11]';
y=[0,0,9,126]';
a_correct = 162;
assert( isequal(polygon_area(x,y),a_correct) )
A =
0
A =
0
A =
45
A =
324.0000

11757 Solvers
Extract leading nonzero digit
1300 Solvers
Back to basics 20  singleton dimensions
248 Solvers
331 Solvers
Spot the First Occurrence of 5
389 Solvers