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

These programs are for the equation u_t + a u_x = 0 where a is a
constant.

These codes solve the advection equation using explicit upwinding.
This one
has boundary conditions for step function initial data and needs
initial
data provided via the
function f.
This one
has periodic boundary conditions and needs
initial
data provided via the
function g.

These codes solve the advection equation using the Lax-Friedrichs
scheme.
This one
has boundary conditions for step function initial data.
This one
has periodic boundary conditions.
Both need the initial
data provided via the f.m and g.m as above.

These codes solve the advection equation using the
Lax-Wendroff scheme.
This one
has boundary conditions for step function initial data.
This one
has periodic boundary conditions.
Both need the initial
data provided via the f.m and g.m as above.

These codes solve the advection equation using the
Beam-Warming scheme.
This one
has boundary conditions for step function initial data.
This one
has periodic boundary conditions.
Both need the initial
data provided via the f.m and g.m as above.

Here are two scripts that test for the convergence of these
schemes: For
periodic boundary conditions you'll need the
function file
g.m
and choose periodic initial data from within it.
For
step function boundary conditions you'll need to make sure
that the
initial data f.m has a step function in it.

Other miscellaneous things:

Two unstable codes:
centered-difference scheme and
explicit downwind scheme.

Here are files that show how I made my plots
make_plots.m and
more_plots.m.

In-class demo script:
February 26.