{{ !articles[0].partner.isSponsoringArticle ? "Platinum" : "Portal" }} Partner

Matrix operations: Gaussian elimination, Upper triangulization and Back-substitution example in C

A simple example of matrix operations (Gaussian elimination, Upper triangulization and Back-substitution) which can be used for solving systems of linear equations, or matrix inversion.

/** Gaussian elimination / Upper triangulization / Back-substitution example by Adrian Boeing


void PrintMatrix(double **mat, int m, int n) {
    for (int j=0;j0;p--) { //pivot backwards through all the rows
        for (int r=p-1;r>=0;r--) { //for each row above the pivot
            float multiple = mat[r][p]; //how many multiples of the pivot row do we need (to subtract)?
            for (int c=p-1;c
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks