x = linspace(-2.2,2.2,2000); y = linspace(-2.2,2.2,2000)'; [Re,Im] = meshgrid(x,y); C = Re + i * Im; B = zeros(2000,2000); z =B; for l = 1:40 z = z.^2 + C; B = B + (abs(z)<2); end; imagesc(B); colormap(jet); axis off;