Cody

Solution 1402989

Submitted on 3 Jan 2018 by Gunther S
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))

C = 0 C = 0 C = 0 C = 0 C = 0

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

C = 0 0.7500 2.0000 20.0000 C = 0 1.0625 5.0000 NaN C = 0 1.6289 NaN NaN C = 0 3.1533 NaN NaN C = 0 NaN NaN NaN

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

C = -1.0000 + 1.0000i 2.0000 + 0.0000i -4.0000 - 2.0000i 2.0000 + 0.0000i C = 0.0000 - 1.0000i 5.0000 + 0.0000i NaN - 2.0000i 2.0000 + 0.0000i C = -1.0000 + 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = 0.0000 - 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = -1.0000 + 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = 0.0000 - 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = -1.0000 + 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = 0.0000 - 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = -1.0000 + 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i C = 0.0000 - 1.0000i NaN + 0.0000i NaN + NaNi 2.0000 + 0.0000i