This code when implemented in MATLAB allows you to model the Heat Equation and obtain the heat distribution through a rod.  The code implements Two Finite Difference Methods: (1) Forward in Time Centered in Space (2) Backwards in Time Centered in Space.  It is a versatile program which allows you to change the initial heat profile and other initial conditions in the code.