Cody

# Problem 823. Find similar/related functions

Solution 110446

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

``` str = DOC, DOCSEARCH, LOOKFOR, MATLABPATH, WHICH str = doc, docsearch, lookfor, matlabpath, which sout = 'doc' 'docsearch' 'lookfor' 'matlabpath' 'which' ```

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

``` str = REGEXPI, REGEXPREP, REGEXPTRANSLATE, STRCMP, STRFIND str = regexpi, regexprep, regexptranslate, strcmp, strfind sout = 'regexpi' 'regexprep' 'regexptranslate' 'strcmp' 'strfind' ```

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

```Error: Matrix dimensions must agree. ```

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

``` str = WHOS, CLEAR, CLEARVARS, SAVE, LOAD str = whos, clear, clearvars, save, load sout = 'whos' 'clear' 'clearvars' 'save' 'load' ```

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

``` str = DIR, HELP, WHO, WHAT, EXIST, LOOKFOR str = dir, help, who, what, exist, lookfor sout = 'dir' 'help' 'who' 'what' 'exist' 'lookfor' ```

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

``` str = DIR, WHO, WHICH, LOOKFOR str = dir, who, which, lookfor sout = 'dir' 'who' 'which' 'lookfor' ```

7   Pass
%% fcn = 'sumabs'; sfcn = {'meanabs','sumsqr','meansqr'}; assert(isequal(seeAlso(fcn),sfcn))

``` str = MEANABS, SUMSQR, MEANSQR str = meanabs, sumsqr, meansqr sout = 'meanabs' 'sumsqr' 'meansqr' ```

8   Fail
%% fcn = 'bsxfun'; sfcn = {'repmat','arrayfun'}; assert(isequal(seeAlso(fcn),sfcn))

```Error: Attempted to access vR(1); index out of bounds because numel(vR)=0. ```

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

```Error: Attempted to access vR(1); index out of bounds because numel(vR)=0. ```

10   Fail
%% fcn = 'cell2mat'; sfcn = {'mat2cell','num2cell'}; assert(isequal(seeAlso(fcn),sfcn))

```Error: Attempted to access vR(1); index out of bounds because numel(vR)=0. ```

11   Pass
%% fcn = 'cumprod'; sfcn = {'cumsum','sum','prod'}; assert(isequal(seeAlso(fcn),sfcn))

``` str = CUMSUM, SUM, PROD str = cumsum, sum, prod sout = 'cumsum' 'sum' 'prod' ```

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

``` str = TOEPLITZ str = toeplitz sout = 'toeplitz' ```

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

``` str = INSPECT, PROPEDIT, UISETFONT str = inspect, propedit, uisetfont sout = 'inspect' 'propedit' 'uisetfont' ```

14   Pass
%% fcn = 'matlab'; sfcn = {}; assert(isequal(seeAlso(fcn),sfcn))

``` ```

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

``` ```