Cody

# Problem 42618. Is this function available?

Solution 2888786

Submitted on 29 Aug 2020
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
assert(isequal(isavailable('sum'),true))

tf = logical 1

2   Pass
assert(isequal(isavailable('mean'),true))

tf = logical 1

3   Pass
assert(isequal(isavailable('bsxfun'),true))

tf = logical 1 Not enough input arguments. 1

4   Fail
assert(isequal(isavailable('pdist'),false))

tf = logical 1 Undefined function 'pdist' for input arguments of type 'double'. 1

Assertion failed.

5   Pass
assert(isequal(isavailable('hankel'),true))

tf = logical 1

6   Pass
assert(isequal(isavailable('std'),true))

tf = logical 1

7   Fail
assert(isequal(isavailable('evalin'),false))

tf = logical 1 Not enough input arguments. 1

Assertion failed.

8   Pass
assert(isequal(isavailable('toeplitz'),true))

tf = logical 1 Index exceeds the number of array elements (0). 1

9   Fail
assert(isequal(isavailable('pdist2'),false))

tf = logical 1 Undefined function 'pdist2' for input arguments of type 'double'. 1

Assertion failed.

10   Fail
assert(isequal(isavailable('assignin'),false))

tf = logical 1 Not enough input arguments. 1

Assertion failed.

11   Pass
assert(isequal(isavailable('cell2mat'),true))

tf = logical 1

12   Pass
assert(isequal(isavailable('arrayfun'),true))

tf = logical 1 Not enough input arguments. 1

13   Pass
assert(isequal(isavailable('cellstr'),true))

tf = logical 1 Conversion to cellstr from double is not possible. 1

14   Fail
assert(isequal(isavailable('imfindcircles'),false))

tf = logical 1 Undefined function 'imfindcircles' for input arguments of type 'double'. 1

Assertion failed.

15   Pass

tf = logical 1 The file name or URL argument must be a character vector or string scalar. 1

16   Pass
assert(isequal(isavailable('plot'),true))

tf = logical 1

17   Fail
assert(isequal(isavailable('ocr'),false))

tf = logical 1 Undefined function 'ocr' for input arguments of type 'double'. 1

Assertion failed.

18   Pass
assert(isequal(isavailable('cellfun'),true))

tf = logical 1 Not enough input arguments. 1

19   Pass
assert(isequal(isavailable('dec2bin'),true))

tf = logical 1

20   Fail
assert(isequal(isavailable('eval'),false))

tf = logical 1 Must be a string scalar or character vector. 1

Assertion failed.

21   Pass
assert(isequal(isavailable('randi'),true))

tf = logical 1 First input must be a positive scalar integer value IMAX, or two integer values [IMIN IMAX] with IMIN less than or equal to IMAX. 1

22   Pass
assert(isequal(isavailable('rng'),true))

tf = logical 1 First input must be a nonnegative integer seed less than 2^32, 'shuffle', 'default', or generator settings captured previously using S = RNG. 1

23   Pass

tf = logical 1 Invalid file identifier. Use fopen to generate a valid file identifier. 1

24   Fail
assert(isequal(isavailable('houghlines'),false))

tf = logical 1 Undefined function 'houghlines' for input arguments of type 'double'. 1

Assertion failed.

25   Pass
assert(isequal(isavailable('kron'),true))

tf = logical 1 Not enough input arguments. 1

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!