Code covered by the BSD License  

Highlights from
Plot2BMP

image thumbnail
from Plot2BMP by Bryan C. Smith
Exports Matlab arrays into BMP images. Many options for color, can handle complex arrays.

mandelbrot.m
% Demo which generates a Mandelbrot set

x = linspace(-2,1,1201);
y = linspace(-1.5,1.5,1201);
[X,Y] = meshgrid(x,y);
Z = X+1i*Y;
C = Z;
U = (abs(Z)<1e2);
for s = 1:60
    Z(U) = Z(U).^2 + C(U);
    U = (abs(Z)<1e2);    
end
S = min(abs(Z),1e2);
Z = S.*exp(1i*angle(Z));

options = struct;
options.colormap = 'bw';
options.invert = true;
options.filename = 'p2b_mandelbrot';

plot2bmp(abs(Z),options)

Contact us