Cody

Solution 2124043

Submitted on 10 Feb 2020
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
p = [0,5; 4.76,1.55; 2.94,-4.05; -2.94,-4.05; -4.76,1.55]; cp = [0,0]; r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 0 5.0000 4.7600 1.5500 2.9400 4.0500 2.9400 4.0500 4.7600 1.5500 p = 5.0000 0 0.2400 3.4500 2.0600 0.9500 2.0600 0.9500 0.2400 3.4500 x = 5×2 logical array 0 1 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test1 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

2   Fail
p = [0,6.58; 6.42,1.92; 3.97,-5.63; -3.97,-5.63; -6.42,1.92]; cp = [0,0]; r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 0 6.5800 6.4200 1.9200 3.9700 5.6300 3.9700 5.6300 6.4200 1.9200 p = 5.0000 -1.5800 -1.4200 3.0800 1.0300 -0.6300 1.0300 -0.6300 -1.4200 3.0800 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test2 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

3   Fail
p = [0,4.55; 4.28,1.44; 2.65,-3.59; -2.65,-3.59; -4.28,1.44]; cp = [0,0]; r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 0 4.5500 4.2800 1.4400 2.6500 3.5900 2.6500 3.5900 4.2800 1.4400 p = 5.0000 0.4500 0.7200 3.5600 2.3500 1.4100 2.3500 1.4100 0.7200 3.5600 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test3 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

4   Fail
cp = [20,8]; p = [0,5; 4.76,1.55; 2.94,-4.05; -2.94,-4.05; -4.76,1.55] + repmat(cp,[5,1]); r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 20.0000 13.0000 24.7600 9.5500 22.9400 3.9500 17.0600 3.9500 15.2400 9.5500 p = -15.0000 -8.0000 -19.7600 -4.5500 -17.9400 1.0500 -12.0600 1.0500 -10.2400 -4.5500 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test4 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

5   Fail
cp = [20,8]; p = [0,6.58; 6.42,1.92; 3.97,-5.63; -3.97,-5.63; -6.42,1.92] + repmat(cp,[5,1]); r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 20.0000 14.5800 26.4200 9.9200 23.9700 2.3700 16.0300 2.3700 13.5800 9.9200 p = -15.0000 -9.5800 -21.4200 -4.9200 -18.9700 2.6300 -11.0300 2.6300 -8.5800 -4.9200 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test5 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

6   Fail
cp = [20,8]; p = [0,4.55; 4.28,1.44; 2.65,-3.59; -2.65,-3.59; -4.28,1.44] + repmat(cp,[5,1]); r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 20.0000 12.5500 24.2800 9.4400 22.6500 4.4100 17.3500 4.4100 15.7200 9.4400 p = -15.0000 -7.5500 -19.2800 -4.4400 -17.6500 0.5900 -12.3500 0.5900 -10.7200 -4.4400 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test6 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

7   Fail
p = [23.66,11.42; 24.37,5.58; 19.05,3.10; 15.04,7.40; 17.89,12.54]; cp = [20,8]; r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 23.6600 11.4200 24.3700 5.5800 19.0500 3.1000 15.0400 7.4000 17.8900 12.5400 p = -18.6600 -6.4200 -19.3700 -0.5800 -14.0500 1.9000 -10.0400 -2.4000 -12.8900 -7.5400 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test7 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

8   Fail
p = [25.01,12.47; 25.98,4.58; 18.78,1.23; 13.37,7.03; 17.22,13.97]; cp = [20,8]; r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 25.0100 12.4700 25.9800 4.5800 18.7800 1.2300 13.3700 7.0300 17.2200 13.9700 p = -20.0100 -7.4700 -20.9800 0.4200 -13.7800 3.7700 -8.3700 -2.0300 -12.2200 -8.9700 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test8 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

9   Fail
p = [23.27,11.12; 23.92,5.87; 19.12,3.63; 15.52,7.50; 18.08,12.13]; cp = [20,8]; r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 23.2700 11.1200 23.9200 5.8700 19.1200 3.6300 15.5200 7.5000 18.0800 12.1300 p = -18.2700 -6.1200 -18.9200 -0.8700 -14.1200 1.3700 -10.5200 -2.5000 -13.0800 -7.1300 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test9 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

10   Fail
p = [30.94,36.26; 35.61,27.09; 28.34,19.82; 19.17,24.49; 20.78,34.65]; cp = [26.97,28.45]; r = 8.75; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 30.9400 36.2600 35.6100 27.0900 28.3400 19.8200 19.1700 24.4900 20.7800 34.6500 p = -25.9400 -31.2600 -30.6100 -22.0900 -23.3400 -14.8200 -14.1700 -19.4900 -15.7800 -29.6500 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test10 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

11   Fail
p = [32.54,38.78; 38.84,26.41; 29.02,16.59; 16.65,22.89; 18.83,36.61]; cp = [26.97,28.45]; r = 8.75; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 32.5400 38.7800 38.8400 26.4100 29.0200 16.5900 16.6500 22.8900 18.8300 36.6100 p = -27.5400 -33.7800 -33.8400 -21.4100 -24.0200 -11.5900 -11.6500 -17.8900 -13.8300 -31.6100 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test11 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

12   Fail
p = [30.49,35.54; 34.69,27.29; 28.14,20.74; 19.89,24.95; 21.34,34.09]; cp = [26.97,28.45]; r = 8.75; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

p = 30.4900 35.5400 34.6900 27.2900 28.1400 20.7400 19.8900 24.9500 21.3400 34.0900 p = -25.4900 -30.5400 -29.6900 -22.2900 -23.1400 -15.7400 -14.8900 -19.9500 -16.3400 -29.0900 x = 5×2 logical array 0 0 0 0 0 0 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "inscribed_pentagon". Error in Test12 (line 5) assert(isequal(inscribed_pentagon(p,cp,r),y_correct))