### matlab *.m files to solve the heat equation.

If these programs strike you as slightly slow, they are. They would run more quickly if they were coded up in C or fortran and then compiled on hans. As matlab programs, would run more quickly if they were compiled using the matlab compiler and then run within matlab. As it is, they're faster than anything maple could do.

This solves the heat equation with explicit time-stepping, and finite-differences in space. heat1.m
A diary where heat1.m is used.

This solves the heat equation with implicit time-stepping, and finite-differences in space. heat2.m At each time step, the linear problem Ax=b is solved with an LU decomposition. This needs subroutines my_LU.m , down_solve.m, and up_solve.m. Compare this routine to heat3.m and verify that it's too slow to bother with.

This solves the heat equation with implicit time-stepping, and finite-differences in space. heat3.m At each time step, the linear problem Ax=b is solved with a periodic tridiagonal routine. This needs subroutines periodic_tridiag.m and tri_diag.m.
A diary where heat3.m is used.

This solves the periodic heat equation with Crank Nicolson time-stepping, and finite-differences in space. heat_cn.m At each time step, the linear problem Ax=b is solved with a periodic tridiagonal routine. This needs subroutines periodic_tridiag.m and tri_diag.m.

This solves the heat equation with Neumann boundary conditions with Crank Nicolson time-stepping, and finite-differences in space. neumann_heat_cn.m At each time step, the linear problem Ax=b is solved with a tridiagonal routine. This needs subroutine tri_diag.m.

This solves the heat equation with explicit time-stepping, and spectrally-computed space derivatives. heat4.m
A diary where heat4.m is used.

This solves the heat equation with implicit time-stepping, and spectrally-computed space derivatives. heat5.m