Cody

Solution 1655396

Submitted on 22 Oct 2018 by li haitao
  • Size: 16
  • 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
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))

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

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