
%change feed and kill rate
f=.055;
k=.062;
%change feed and kill rate
da = 1;
db = .5;
width = 128;
dt = .25;
stoptime = 5000;
axes('Position',[0 0 1 1])
axis off
tic
[t, A, B] = initial_conditions(width);

hi = image(B);
hi.CDataMapping = 'scaled';

nframes = 1;
while t<stoptime
    anew = A + (da*my_laplacian(A) - A.*B.^2 + f*(1-A))*dt;
    bnew = B + (db*my_laplacian(B) + A.*B.^2 - (k+f)*B)*dt;
    A = anew;
    B = bnew;
    hi.CData = B;
    t = t+dt;
    ht.String = ['Time = ' num2str(t)];
    drawnow limitrate
    nframes = nframes+1;
end
delta = toc;
disp([num2str(nframes) ' frames in ' num2str(delta) ' seconds']);