Cody

Solution 167073

Submitted on 22 Nov 2012
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   Fail
%% 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')))
Error: Assertion failed.
2   Pass
%% x = [42 1 1 1 42 17 17]; assert(isequal(your_fcn_name(x),unique(x,'stable')))
a = 1 17 42 b = 2 6 1
3   Pass
%% x = rand(1,25); assert(isequal(your_fcn_name(x),unique(x,'stable')))
a = Columns 1 through 10 0.2014 0.2078 0.2091 0.2307 0.2590 0.2677 0.3063 0.3712 0.3881 0.4825 Columns 11 through 20 0.5376 0.5489 0.5547 0.5651 0.5656 0.6059 0.6187 0.7030 0.7052 0.7937 Columns 21 through 25 0.8394 0.8801 0.8945 0.9132 0.9135 b = Columns 1 through 16 3 23 5 17 18 7 13 8 10 1 15 24 22 25 21 14 Columns 17 through 25 6 4 9 20 16 12 2 11 19