Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
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))
|
2 | Pass |
%%
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.399727960270419 - 0.202175773787978i
-0.183222557898698 - 0.002413006442529i
-0.077955462900324 + 0.071768146386093i
-0.063780309061143 - 0.114292725842111i
-0.134766354708984 + 0.095919202292536i
-0.184699544161306 + 0.146041319618000i
|
3 | Pass |
%%
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.230204932479534
0.569872178285871
-0.158469165385574
0.257058481145950
0.453536003022045
0.661974433286406
|
It dseon't mettar waht oedrr the lrettes in a wrod are.
494 Solvers
307 Solvers
44 Solvers
78 Solvers
1019 Solvers