Cody

Solution 1249270

Submitted on 10 Aug 2017 by yurenchu
  • Size: 35
  • This is the leading solution.
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
Ax = [1 2 3 4 5 6; 11 12 13 14 15 16; 21 22 23 24 25 26; 31 32 33 34 35 36; 41 42 43 44 45 46; 51 52 53 54 55 56]; r1x = 0; r2x = 4; c1x = 1; c2x = 4; y_correct = 31.7; assert(isequal(mean2d_excl(Ax,r1x,r2x,c1x,c2x),y_correct));

2   Pass
Ax = [1 2 3 4 5 6; 11 12 13 14 15 16; 21 22 23 24 25 26; 31 32 33 34 35 36; 41 42 43 44 45 46; 51 52 53 54 55 56]; r1x = 1; r2x = 4; c1x = 1; c2x = 4; y_correct = 29.875; assert(isequal(mean2d_excl(Ax,r1x,r2x,c1x,c2x),y_correct));

3   Pass
Ax = [1 2 3 ; 12 13 14; 24 25 26]; r1x = 1; r2x = 4; c1x = 1; c2x = 4; y_correct = 8.4; assert(isequal(mean2d_excl(Ax,r1x,r2x,c1x,c2x),y_correct));