Cody

# Problem 785. Mandelbrot Number Test [Real+Imaginary]

Solution 2223652

Submitted on 20 Apr 2020
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   Fail
format long v=[-2; 0.22-0.54i ; 0.25-.54i ; 0.26 ;.125+.125i; 0.25]; tf=isMandelbrot(v); tf_expected=[1 ; 0 ; 1 ; 0 ; 1 ; 1] ; assert(isequal(tf,tf_expected),sprintf('\n%f %f %f %f %f %f',tf,tf_expected))

Undefined function 'isMandelbrot' for input arguments of type 'double'. Error in Test1 (line 4) tf=isMandelbrot(v);

2   Fail
v=-.25*ones(6,1)+(rand(6,1)-.5)/2+i*(rand(6,1)-.5)/2 %v=[-.5-.25i;-.5+.25i;-.25i;.25i;-.25-.25i;-.25+.25i] % Bounding Cases tf=isMandelbrot(v); tf_expected=[1 ; 1 ; 1 ; 1 ; 1 ; 1] ; assert(isequal(tf,tf_expected),sprintf('\n%f %f %f %f %f %f',tf,tf_expected))

v = -0.339789236210523 - 0.210928261798099i -0.083745236772713 + 0.202594395031019i -0.242626192005494 - 0.090320201377075i -0.474441910009710 - 0.176713569233636i -0.469775945116597 + 0.002697900594654i -0.051779386403794 + 0.138451074857315i

Undefined function 'isMandelbrot' for input arguments of type 'double'. Error in Test2 (line 6) tf=isMandelbrot(v);

3   Fail
v=rand(6,1)-0.25 tf=isMandelbrot(v); tf_expected=v<=0.25; % non-imaginary range [-2.0,0.25] assert(isequal(tf,tf_expected),sprintf('\n%f %f %f %f %f %f',v,tf,tf_expected))

v = 0.208693544677252 0.514661159322059 0.573141574529343 0.280667298700355 0.043607028517888 -0.035733815527358

Undefined function 'isMandelbrot' for input arguments of type 'double'. Error in Test3 (line 2) tf=isMandelbrot(v);