Cody

Solution 323423

Submitted on 25 Sep 2013 by James
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_fixed_point = fixed_point(@(x) 2./(2*x+1),0,5) assert(abs(0.8923-x_fixed_point)<1e-4)
x_fixed_point = 0.8923
2   Pass
%% x_fixed_point = fixed_point(@(x) 2./(2*x+1),0,20) assert(abs(0.7807-x_fixed_point)<1e-4)
x_fixed_point = 0.7807
3   Pass
%% x_fixed_point = fixed_point(@(x) exp(-x),0,2) assert(abs(0.3679-x_fixed_point)<1e-4)
x_fixed_point = 0.3679
4   Pass
%% x_fixed_point = fixed_point(@(x) exp(-x),0,10) assert(abs(0.5649-x_fixed_point)<1e-4)
x_fixed_point = 0.5649