Solving the Diffusion Equation using Method of Lines
Method of lines is a numerical technique used to solve a large class of partial differential equations (PDEs). Method to lines uses finite differences methods by discretising all spatial variables of a PDE while time remains continuous. This results in a system of ordinary differential equations (ODEs) which can be solve numerically using solvers such as ode15s() in Matlab. One prime example of a PDE encountered by many undergraduate students is the diffusion equation....