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. As matlab
programs, would run more quickly if they were compiled using the
matlab compiler and then run within matlab.
This solves the heat equation with explicit time-stepping, and finite-differences
in space. The domain is [0,2pi] and the boundary conditions are periodic.
heat1.m
A diary where heat1.m is used.
Demos from Class Jan 29
Here's the
script that's testing out the
healthy code
for explicit Euler with Neumann boundary conditions.
Here's the
script that's testing out the
buggy code
for explicit Euler with Neumann boundary conditions.
Here's the
script that's testing out the
code
for explicit Euler with first-order correct implementation of Neumann boundary conditions.
Demos from Class Feb 7
Here's the
script that's testing out the
code
for explicit Euler in 2-d with periodic boundary conditions.