Cody

# Problem 823. Find similar/related functions

Solution 1873961

Submitted on 14 Jul 2019
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
fcn = 'help'; sfcn = {'doc','docsearch','lookfor','matlabpath','which'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×4 cell array {'doc'} {'docsearch'} {'matlabpath'} {'which'}

Assertion failed.

2   Pass
fcn = 'regexp'; sfcn = {'regexpi','regexprep','regexptranslate','strcmp','strfind'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×5 cell array {'regexpi'} {'regexprep'} {'regexptranslate'} {'strcmp'} {'strfind'}

3   Pass
fcn = 'why'; sfcn = {}; assert(isequal(seeAlso(fcn),sfcn))

4   Pass
fcn = 'who'; sfcn = {'whos','clear','clearvars','save','load'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×5 cell array {'whos'} {'clear'} {'clearvars'} {'save'} {'load'}

5   Pass
fcn = 'which'; sfcn = {'dir','help','who','what','exist','lookfor'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×8 cell array {'dir'} {'help'} {'who'} {'what'} {'exist'} {'lookfor'} {'fileparts'} {'mfilename,'}

6   Pass
fcn = 'what'; sfcn = {'dir','who','which','lookfor'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×4 cell array {'dir'} {'who'} {'which'} {'lookfor'}

7   Pass
fcn = 'bsxfun'; sfcn = {'repmat','arrayfun'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×2 cell array {'repmat'} {'arrayfun'}

8   Pass
fcn = 'mat2cell'; sfcn = {'cell2mat','num2cell'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×2 cell array {'cell2mat'} {'num2cell'}

9   Pass
fcn = 'cell2mat'; sfcn = {'mat2cell','num2cell'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×2 cell array {'mat2cell'} {'num2cell'}

10   Pass
fcn = 'hankel'; sfcn = {'toeplitz'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×1 cell array {'toeplitz'}

11   Pass
fcn = 'uisetcolor'; sfcn = {'inspect','propedit','uisetfont'}; assert(isequal(seeAlso(fcn),sfcn))

sfcn = 1×3 cell array {'inspect'} {'propedit'} {'uisetfont'}

12   Pass
fcn = 'matlabiscool'; sfcn = {}; assert(isequal(seeAlso(fcn),sfcn))

13   Pass
fcn = 'crazy'; sfcn = {}; assert(isequal(seeAlso(fcn),sfcn))