Cody

Solution 1544113

Submitted on 30 May 2018 by Ben Cappello
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
inp_matrix = [1,0,0,1,1;0,1,1,0,0;0,0,0,0,0;1,1,1,1,1;1,1,1,1,1]; pct_zero_corr = 40; assert(isequal(zero_stat(inp_matrix),pct_zero_corr))

y = 15 g = 25 y = 10 pct_zero = 40

2   Pass
inp_matrix = diag([1,0,1,1,1]); pct_zero_corr = 84; assert(isequal(zero_stat(inp_matrix),pct_zero_corr))

y = 4 g = 25 y = 21 pct_zero = 84

3   Pass
inp_matrix = [1,0,1,0,0,0,1]'; pct_zero_corr = 57; assert(isequal(zero_stat(inp_matrix),pct_zero_corr))

y = 3 g = 7 y = 4 pct_zero = 57