Cody

Solution 202387

Submitted on 9 Feb 2013 by Claudio Gelmi
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
%% C = 0; lim = 5; N_correct = 5; assert(isequal(mandelbrot(C,lim),N_correct))

z = 0 z = 0 z = 0 z = 0 z = 0

2   Pass
%% C = [0 0.5; 1 4]; lim = 5; N_correct = [5 4; 2 1]; assert(isequal(mandelbrot(C,lim),N_correct))

z = 0 0.5000 1.0000 4.0000 z = 0 0.7500 2.0000 20.0000 z = 0 1.0625 5.0000 404.0000 z = 1.0e+05 * 0 0.0000 0.0003 1.6322 z = 1.0e+10 * 0 0.0000 0.0000 2.6641

3   Pass
%% i = sqrt(-1); C = [i 1 -2*i -2]; lim = 10; N_correct = [10 2 1 10]; assert(isequal(mandelbrot(C,lim),N_correct))

z = 0 + 1.0000i 1.0000 0 - 2.0000i -2.0000 z = -1.0000 + 1.0000i 2.0000 -4.0000 - 2.0000i 2.0000 z = 0 - 1.0000i 5.0000 12.0000 +14.0000i 2.0000 z = 1.0e+02 * -0.0100 + 0.0100i 0.2600 -0.5200 + 3.3400i 0.0200 z = 1.0e+05 * 0 - 0.0000i 0.0068 -1.0885 - 0.3474i 0.0000 z = 1.0e+10 * -0.0000 + 0.0000i 0.0000 1.0642 + 0.7563i 0.0000 z = 1.0e+20 * 0 - 0.0000i 0.0000 0.5606 + 1.6096i 0.0000 z = 1.0e+40 * -0.0000 + 0.0000i 0.0000 -2.2766 + 1.8047i 0.0000 z = 1.0e+80 * 0 - 0.0000i 0.0000 1.9261 - 8.2173i 0.0000 z = 1.0e+161 * -0.0000 + 0.0000i 0.0000 -6.3815 - 3.1654i 0.0000