using System; using System.Collections.Generic; using System.Linq; using System.Text; using L = Science.Mathematics.LinearAlgebra; namespace Strang3Ed.Chapter05.Section3 { public class ExampleA { public ExampleA() { } private string result; public string Result { get { return result; } } public void Compute() { double[,] x = {{2.0,6.0,2.0}, {1.0,4.0,2.0}, {5.0,9.0,0.0}}; L.Matrix A = new L.Matrix(x); double[] y = { 0.0, 0.0, 1.0 }; L.Vector b = new L.Vector(y); L.LinearEquation eq = new L.LinearEquation(A, b); eq.Solve(); foreach(double s in eq.Solution) result += s.ToString() + "\r\n"; } } } /* 2 -1 1 */