Cody

Solution 857884

Submitted on 28 Mar 2016 by eggart
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))

Cn = 0 N = 5 Cn = 0 N = 5 Cn = 0 N = 5 Cn = 0 N = 5 Cn = 0 N = 5

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

Cn = 0 0.7500 2.0000 20.0000 N = 5 5 5 1 Cn = 0 1.0625 5.0000 404.0000 N = 5 5 2 1 Cn = 1.0e+05 * 0 0.0000 0.0003 1.6322 N = 5 5 2 1 Cn = 1.0e+10 * 0 0.0000 0.0000 2.6641 N = 5 4 2 1 Cn = 1.0e+20 * 0 0.0000 0.0000 7.0973 N = 5 4 2 1

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))

Cn = -1.0000 + 1.0000i 2.0000 + 0.0000i -4.0000 - 2.0000i 2.0000 + 0.0000i N = 10 10 1 10 Cn = 0.0000 - 1.0000i 5.0000 + 0.0000i 12.0000 +14.0000i 2.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+02 * -0.0100 + 0.0100i 0.2600 + 0.0000i -0.5200 + 3.3400i 0.0200 + 0.0000i N = 10 2 1 10 Cn = 1.0e+05 * 0.0000 - 0.0000i 0.0068 + 0.0000i -1.0885 - 0.3474i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+10 * -0.0000 + 0.0000i 0.0000 + 0.0000i 1.0642 + 0.7563i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+20 * 0.0000 - 0.0000i 0.0000 + 0.0000i 0.5606 + 1.6096i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+40 * -0.0000 + 0.0000i 0.0000 + 0.0000i -2.2766 + 1.8047i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+80 * 0.0000 - 0.0000i 0.0000 + 0.0000i 1.9261 - 8.2173i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+161 * -0.0000 + 0.0000i 0.0000 + 0.0000i -6.3815 - 3.1654i 0.0000 + 0.0000i N = 10 2 1 10 Cn = 1.0e+181 * 0.0000 - 0.0000i 1.4378 + 0.0000i Inf + Infi 0.0000 + 0.0000i N = 10 2 1 10