s = inline('1./(sqrt(2*t)).*exp(-x.^2./sqrt(4*t))','x','t');
x=-10:.1:10;
plot(x,s(x,.1));
plot(x,erf(x));

u=inline('1/2*(erf((x+1)./sqrt(4*k*t))-erf((x-1)/sqrt(4*k*t)))','x','t','k');
plot(x,u(x,0.01,1));axis([-2 2 0 2]);
for t=1e-5:1e-2:1 plot(x,u(x,t,1));axis([-2 2 0 1]);pause(0.1);end

