Could someone please explain what is wrong in this simple code
cm=@(x,t) exp((-x^2)/(4*Dt))/2*(pi*Dt)^(1/2);for Dt=[1/16,1/4,1]for x=-5:.01:5 hold on plot(x,cm)end
or
cm=inline('exp((-x^2)/(4*Dt))/2*(pi*Dt)^(1/2)','x','Dt');for Dt=[1/16,1/4,1]hold on fplot(@(x) cm,[-5,5])end
it doesn't work either way. tnx
end
Best Answer