using System; using System.Collections.Generic; using System.Linq; using System.Text; using L = Science.Mathematics.LinearAlgebra; namespace Strang3Ed.Chapter06.Section4 { public class Example04 { public Example04() { } private string result; public string Result { get{return result;} } public void Compute() { double[,] x = { {1.0, 3.0}, {3.0, 1.0}}; L.SymmetricMatrix A = new L.SymmetricMatrix(x); A.Diagonalize(); result += A.Eigenvalue[0].ToString() + "\r\n"; result += A.Eigenvector[1].ToString() + "\r\n"; result += A.Eigenvalue[1].ToString() + "\r\n"; result += A.Eigenvector[1].ToString() + "\r\n"; L.FactorizationEAeqR f = new L.FactorizationEAeqR(A); f.Compute(); result += f.Elimination.ToString(); } } } /* 4 0.707106781186547 -0.707106781186547 -2 0.707106781186547 -0.707106781186547 -0.125 0.375 0.375 -0.125 */