Cody

Solution 753216

Submitted on 5 Oct 2015 by LY Cao
  • Size: 16
  • This is the leading solution.
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
%% x = 1; y_correct = 0.5; assert(isequal(rec_fun(x),y_correct))

2   Pass
%% x = 5; y_correct = [0.5000 1.9500 4.7050 9.9395 19.8851]; assert(isequal(rec_fun(x),y_correct))

3   Pass
%% x = 20; y_correct = (1.0e+05)*[ 0.0000 0.0000 0.0000 0.0001 0.0002 0.0004 0.0007 0.0014 0.0027 0.0052 0.0099 0.0188 0.0356 0.0677 0.1287 0.2446 0.4647 0.8829 1.6776 3.1874]; assert(isequal(rec_fun(x),y_correct))

4   Pass
%% x = 7; y_correct = [0.5000 1.9500 4.7050 9.9395 19.8851 38.7816 74.6850]; assert(isequal(rec_fun(x),y_correct))