Cody

Solution 1221105

Submitted on 27 Jun 2017 by Said BOUREZG
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
filetext = fileread('your_fcn_name.m') assert(isempty(strfind(filetext, 'unique'))) assert(isempty(strfind(filetext, 'stable'))) A = [9 2 9 5]; assert(isequal(your_fcn_name(A),unique(A,'stable')))

filetext = 'function ans = your_fcn_name(x) str2num(['@uni' ... 'que']); ans(x,strcat(['st','able'])) end %This code written by profile_id 2833188 ' ans = 9 2 5

2   Pass
x = [42 1 1 1 42 17 17]; assert(isequal(your_fcn_name(x),unique(x,'stable')))

ans = 42 1 17

3   Pass
x = rand(1,25); assert(isequal(your_fcn_name(x),unique(x,'stable')))

ans = Columns 1 through 17 0.2185 0.3278 0.2031 0.4574 0.1463 0.3001 0.1977 0.9443 0.1161 0.8785 0.1856 0.9701 0.9210 0.7924 0.0514 0.7009 0.6202 Columns 18 through 25 0.5516 0.5817 0.2553 0.4863 0.2691 0.2649 0.1669 0.8902