Cody

Solution 1381497

Submitted on 15 Dec 2017 by John Breuer
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 y = your_fcn_name(x) s='(?@y=uniquZ(x,''stablZ''))'; s(regexp(s,'Z'))='e'; regexp('',s); end %This code written by profile_id 5992662 ' y = 9 2 5

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

y = 42 1 17

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

y = Columns 1 through 17 0.0971 0.6446 0.0513 0.2530 0.5527 0.4357 0.0926 0.0764 0.1105 0.3923 0.7304 0.0197 0.5209 0.3442 0.8996 0.8134 0.3868 Columns 18 through 25 0.3227 0.9381 0.5079 0.4579 0.8162 0.7518 0.3378 0.0902