MATLAB GUI: Heat Equation on the Whole Line

Description
This MATLAB GUI plots the solution to the one-dimensional heat equation, ut = c2(uxx + uyy), as a function of time and for "top hat" initial conditions.
- The solution is calculated as the convolution of the heat kernel with the initial condition.
- The resulting integral is re-written in terms of the error function and is evaluated numerically.
- Changing the diffusion coefficient (c2) amounts to rescaling the time variable.
How to use the GUI
- Use the sliders in the Initial conditions panel to choose the height and the width of the "top hat" initial condition.
- Adjust the diffusion coefficient.
- Use the slider under the plot window to see how the solution evolves in time.
- The solution at time t is shown in red and the initial condition in blue.
Download
Download (right click on each link below) the following files into a directory. Set the MATLAB path to that directory and type Heat_Equation_WL at the MATLAB prompt. Type help Heat_Equation_WL at the MATLAB prompt if you need to be reminded of how to use the GUI.© GUI developed by Joceline Lega, Spring 2007.