Cody

Solution 2002612

Submitted on 4 Nov 2019 by Minna Apostolova
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
A = [3 4 5 6 2 4 5 6 3 6]; n = 4; y_correct = [0 0 5 6 0 0 5 6 0 6]; assert(isequal(find_elements(A,n),y_correct))

2   Pass
A = [0; 6; 1; 7; 3; 5; 2; 4]; n = 3; y_correct = [0; 6; 0; 7; 0; 5; 0; 4]; assert(isequal(find_elements(A,n),y_correct))

3   Pass
A = magic(4); n = 8; y_correct = [16 0 0 13; 0 11 10 0; 9 0 0 12; 0 14 15 0]; assert(isequal(find_elements(A,n),y_correct))

Suggested Problems

More from this Author1