Solution 198249

Submitted on 29 Jan 2013
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, log in.

Test Suite

Test Status Code Input and Output
1   Fail
%% Test the example A = 1; iterations = 4; y_correct8 = [1 3 7 15 31]; assert(isequal(your_fcn_name(A,iterations),y_correct8))

Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem16/your_fcn_name.m>your_fcn_name".

2   Fail
%% More ietrations A = 1; iterations = 1000; C= A for i = 1:iterations C(i+1) = 2*C(i)+1; end assert(isequal(your_fcn_name(A,iterations),C))

Error: Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.