Back substitution is a method used to solve systems of linear equations in the form of their upper triangular matrix. In Matlab, this can be accomplished using the "triu" function to obtain the upper part of the matrix and then using for-loops to substitute values backwards from the bottom of the matrix.
Here's an example implementation:
main.m331 chars14 lines
This implementation assumes that the given matrix A is an upper triangular matrix, where all entries below the main diagonal are zero.
gistlibby LogSnag