Cody

Solution 1743007

Submitted on 5 Mar 2019 by Athi
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
m=magic(7);thresh=30; assert(isequal(rolling_max(m, thresh),5))

2   Pass
m=magic(14);thresh=200; assert(isequal(rolling_max(m, thresh),0));

3   Pass
m=100:-2:0;thresh=50; assert(isequal(rolling_max(m, thresh),1));

4   Pass
m=reshape(1:1000,50,[]);thresh=ceil(200*rand); assert(isequal(rolling_max(m, thresh),1000-thresh));

5   Pass
m=sort(rand(1,200));thresh=rand(); assert(isequal(rolling_max(m, thresh),sum(m>thresh)));

6   Pass
m=[1 3 5 7 9 ; 1 3 5 7 9 ; 2 4 6 8 10; 2 4 6 8 10]; thresh=2; assert(isequal(rolling_max(m, thresh),8));