/// <summary> /// Вывести матрицы и векторы системы /// </summary> private void Shows() { "D1".Show(); D1.PrintMatrix(); "D2".Show(); D2.PrintMatrix(); "S".Show(); S.PrintMatrix(); "R1".Show(); R1.Show(); "R2".Show(); R2.Show(); }
public static void SqMatrixExamples() { var mat = new SqMatrix(new double[, ] { { 1, -5 }, { -40, 0.632 } }); mat.PrintMatrix(); // 1 -5 //- 40 0,632 var i = SqMatrix.I(mat.RowCount); i.PrintMatrix(); //1 0 //0 1 var mat2 = mat + i * 40; mat2.PrintMatrix(); //41 -5 //-40 40,632 var inv = mat.Invertion; inv.PrintMatrix(); //-0,003170017254524297 -0,02507925043136311 //-0,20063400345090485 - 0,0050158500862726215 (inv * mat).PrintMatrix(); //1 0 //2,7755575615628914E-17 0,9999999999999999 (inv * mat).Track.Show(); // 2 (inv * mat).CubeNorm.Show(); // 1 (inv * mat).Det.Show(); // 0,9999999999999999 mat.Solve(new Vectors(4.0, -5)).Show(); // ( 0,11271618313871837 -0,7774567633722562 ) }