Diffusion on infinite line with no flux

110 Views Asked by At

I am solving the diffusion equation $$ \frac{\partial \rho}{\partial t}=D\frac{\partial^2 \rho}{\partial x^2} $$ on an infinite line with initial condition that the particle density $\rho(t=0.1,x)$ is a normal distribution. For a no flux boundary condition I get an error in Matlab. Is it not possible to have no flux in this case as there are "no ends to insulate"?