Cody

Problem 81. Mandelbrot Numbers

Solution 148673

Submitted on 15 Oct 2012
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 t = 1 y = 1 z = 0 t = 1 y = 2 z = 0 t = 1 y = 3 z = 0 t = 1 y = 4 z = 0 t = 1 y = 5 z = 0 t = 0 y = 5

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

Error: Assertion failed.

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

Error: Matrix dimensions must agree.

Suggested Problems

More from this Author95

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!