Cody

# Problem 510. Selecting books on MATLAB for experts and beginners (blindfolded)

Solution 1144728

Submitted on 23 Mar 2017
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
assert(abs(need2(1)-1)<0.001)

Error using regexp Evaluation of 'y = varargin/(2*varargin-1);' failed: Undefined function 'mtimes' for input arguments of type 'cell'. Error in need2 (line 2) regexp '' '(?@y = varargin/(2*varargin-1);)' Error in TestPoint1 (line 1) assert(abs(need2(1)-1)<0.001)

2   Fail
assert(abs(need2(2)-0.6667)<0.001)

Error using regexp Evaluation of 'y = varargin/(2*varargin-1);' failed: Undefined function 'mtimes' for input arguments of type 'cell'. Error in need2 (line 2) regexp '' '(?@y = varargin/(2*varargin-1);)' Error in TestPoint2 (line 1) assert(abs(need2(2)-0.6667)<0.001)

3   Fail
assert(abs(need2(10)-0.5263)<0.001)

Error using regexp Evaluation of 'y = varargin/(2*varargin-1);' failed: Undefined function 'mtimes' for input arguments of type 'cell'. Error in need2 (line 2) regexp '' '(?@y = varargin/(2*varargin-1);)' Error in TestPoint3 (line 1) assert(abs(need2(10)-0.5263)<0.001)

4   Fail
assert(abs(need2(100)-0.5025)<0.001)

Error using regexp Evaluation of 'y = varargin/(2*varargin-1);' failed: Undefined function 'mtimes' for input arguments of type 'cell'. Error in need2 (line 2) regexp '' '(?@y = varargin/(2*varargin-1);)' Error in TestPoint4 (line 1) assert(abs(need2(100)-0.5025)<0.001)

5   Fail
assert(abs(need2(1000)-0.5003)<0.001)

Error using regexp Evaluation of 'y = varargin/(2*varargin-1);' failed: Undefined function 'mtimes' for input arguments of type 'cell'. Error in need2 (line 2) regexp '' '(?@y = varargin/(2*varargin-1);)' Error in TestPoint5 (line 1) assert(abs(need2(1000)-0.5003)<0.001)