MATLAB 3D Finite different method using matlab

Tags:
1. May 10, 2015

Can anyone show me how to solve the 3D diffusion equation which has been modeled into FDM by using matlab?

2. May 10, 2015

Strum

Suppose your stencil only uses nearest and next nearest neighbors on a cubic periodic domain with N lattice points in each direction. Define Im = (1:N)-1;Im(Im==0)=N; and Ip = 2:N+1;Ip(Ip==N+1)=1; Define your system and matrices and use A(lp,lp,lm) $\sim A_{i+1,i+1,i-1}$ in your stencil.

3. May 10, 2015