From: Andy on
> % from
> psi=zeros(size(y));
> % to
> psi=zeros(size(y),'double');

% Slightly faster:

m = 50000;
n = 5000;
tic
a=zeros(m,n);
timea = toc
clear a

tic
b=zeros([m,n],'double');
timeb = toc
clear b

tic
c(m,n) = 0;
timec = toc

% displays:
timea =
0.873374775
timeb =
9.3843e-005
timec =
4.9347e-005