Here are a few FORTRAN programs
that can be used for various numerical calculations such as root finding,
"curve" fitting, solving systems of linear equations by matrix reduction,
and solving differential equations. The quadratic formula, Newton-Raphson
method, Least Squares linear fit, Gauss-Jordon Elimination, and fourth
order Runge Kutta method are coded in these programs. Feel free to download,
use, and/or reference.
Quad.for
Uses the Quadratic Formula to solve for the
roots of an equation fitting the form Ax^2+Bx+C=0.
Newton.for
Solves for the root(s) of an equation, using
the Newton-Raphson method. Asks for an initial "guess" of the root.
Least.for
Uses the Least Squares method to find the best
fit straight line for a set of data points. (REQUIRES AN INPUT FILE NAMED
LSMIN.DAT TO READ IN NUMBER OF POINTS AND THEN THE DATA POINTS THEMSELVES).
Gauss.for
Solves a system of linear equations using the
Gaussian Elimination (matricies) method with complete pivoting. Can solve
different matrix sizes, determined by the user. (REQUIRES A INPUT DATA
FILE NAMED "DATAIN.DAT" TO INPUT THE NUMBER OF ROWS, THE NUMBER OF CONSTANTS,
AND THEN THE DATA IN MATRIX FORM).
Runge.for
Uses the RUNGE KUTTA method to solve 4 differential
equations simultaneously. The DE's used in the program as an example (which
can be changed by you, the user), describe two masses on springs. |