5. Gaussian elimination

The GaussianElimination example solution is fairly complicated, partly because Gaussian elimination is complicated, but also because it must convert user-entered text into an augmented matrix.

The program uses the following code to build the augmented matrix from the user's text. It gets the equations' coefficients from the coefficientsTextBox control. It gets the equations' results (the Cs on the right in the problem description) from the valuesTextBox control:

// Load the augmented array.// Column numCols holds the result values.// Column numCols + 1 will hold the final values after // backsolving.private double[,] LoadArray(out int numRows, out int numCols){    // Build the augmented matrix. string[] valueRows = valuesTextBox.Text.Split( ...

Get Improving your C# Skills now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.