Cody

Problem 24. Function Iterator

Solution 555291

Submitted on 10 Jan 2015 by Lukas
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
%% noOp = @(x)x; fh2 = iterate_fcn(noOp, 50); assert(isequal(fh2(pi),pi));

fh2 = @(x)nested_function(x) nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416 nested_output = 3.1416

2   Pass

fh2 = @(x)nested_function(x) nested_output = 4 nested_output = 5 nested_output = 6 nested_output = 7 nested_output = 8 nested_output = 9 nested_output = 10 nested_output = 11 nested_output = 12 nested_output = 13

3   Pass