Solve a System of Linear Equations, Ax=B

Here is a Fortran program which solves a system of linear equations: LIN_EQ.F

It is compiled via:

gfortran -o LIN_EQ LIN_EQ.F -llapack

The program uses the LAPACK subroutine: DGESV

* * *

A version written in C/C++ is given at:  linear_eq.cpp 

It is compiled via:

gcc -o linear_eq linear_eq.cpp -llapack -lstdc++

* * *

Tom Irvine

Leave a Comment