Cody

Solution 580954

Submitted on 12 Feb 2015 by Ritwik Rudra
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
%% x = [1 2 3 4 5 6 7]; y = [5 6 7 2]; assert(isequal(extract_elements(x),y))

ans = 5 ans = 5 6 ans = 5 6 7 ans = 5 6 7 2

2   Pass
%% x = [3 7 12 9 4 2 8 3 2 1]; y = [4 2 8 7]; assert(isequal(extract_elements(x),y))

ans = 4 ans = 4 2 ans = 4 2 8 ans = 4 2 8 7

3   Pass
%% x = [12.2 16.5 13.2 2.5 9.7 7.6 3.1 1.4]; y = [9.7 7.6 3.1 16.5]; assert(isequal(extract_elements(x),y))

ans = 9.7000 ans = 9.7000 7.6000 ans = 9.7000 7.6000 3.1000 ans = 9.7000 7.6000 3.1000 16.5000