Analyze an ODE Solution for Many Parameter Values

**ODE_SWEEP_SERIAL**
is a directory which
computes the solution of an ODE for many parameter values, keeping track
of the maximum absolute value of the solution.

Consider the parameterized second order differential equation:

m x'' + b x' + k x = 0which represents the behavior of a spring mass system with a mass of

We now suppose that we are interested in properties of the solution **x(t)**
over the time interval from 0 to 25 seconds, as we vary the physical properties
**b** and **k**. In particular, we would like to know the maximum value
of **x(t)** over the time interval for each choice of the physical parameters.

To answer this question, we must solve the ODE for each choice of the parameters.

The basic function has the form:

function peakVals = ode_fun ( bVals, kVals )where

- bVals is an array of B values;
- kVals is an array of K values;
- peakVals is an array containing the maximum value of the ODE solution for each combination of B and K.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**ODE_SWEEP_SERIAL** is available in
a MATLAB version.

COLLATZ, a MATLAB library which computes and analyzes the Collatz sequence (or "hailstone" sequence or "3n+1 sequence");

FFT_SERIAL, a MATLAB program which demonstrates the computation of a Fast Fourier Transform, and is intended as a starting point for implementing a parallel version.

FIRE_SERIAL, a MATLAB program which simulates a forest fire over a rectangular array of trees, starting at a single random location. It is intended as a starting point for the development of a parallel version.

MD, a MATLAB program which carries out a molecular dynamics simulation, and is intended as a starting point for implementing a parallel version.

MXM, a MATLAB program which sets up a matrix multiplication problem A=B*C, intended as a starting point for implementing a parallel version.

POISSON_SERIAL, a MATLAB program which computes an approximate solution to the Poisson equation in a rectangle, and is intended as the starting point for the creation of a parallel version.

PRIME_SERIAL, a MATLAB program which counts the number of primes between 1 and N, intended as a starting point for the creation of a parallel version.

QUAD_SERIAL, a MATLAB program which approximates an integral using a quadrature rule, and is intended as a starting point for parallelization exercises.

QUAD2D_SERIAL, a MATLAB program which approximates an integral over a 2D region using a product quadrature rule, and is intended as a starting point for parallelization exercises.

SATISFY, a MATLAB program which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem.

SEARCH_SERIAL, a MATLAB program which searches the integers from A to B for a value J such that F(J) = C. this version of the program is intended as a starting point for a parallel approach.

TIMER, MATLAB programs which demonstrate how to compute CPU time or elapsed time.

- ode_fun.m, the function which performs the calculations.
- ode_system.m, a function which redefines the second order ODE as a pair of first order ODE's, suitable for treatment by MATLAB's ODE solvers.
- ode_display.m, a script which displays a contour plot of the results of the parameter sweep.

- ode_script.m, sets up a parameter sweep and runs the code.
- ode_script_output.txt, the output file.
- ode_display.png, a surface plot of the data XMAX(B,K) computed by the program.

You can go up one level to the MATLAB source codes.