Cody

Solution 2133430

Submitted on 19 Feb 2020 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
n = 7; k=4; seq=1:50; y_correct = 27; assert(isequal(take_out(seq,n,k),y_correct))

2   Pass
n = 17; k=4; seq=1:50; y_correct = []; assert(isempty(take_out(seq,n,k)))

3   Pass
n = 15; k=6; seq=500:4:1000; y_correct = 860; assert(isequal(take_out(seq,n,k),y_correct))

4   Pass
n = 4; k=15; seq=500:4:1000; y_correct = 548; assert(isequal(take_out(seq,n,k),y_correct))

5   Pass
n = 34; k=26; seq=-3000:2:1000; y_correct = -1556; assert(isequal(take_out(seq,n,k),y_correct))