using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter1.Section5 { public class Example04 { public Example04() { } private string result; public string Result { get{return result;} } public void Compute() { V.Matrix A = new V.Matrix(3, 3); A[0, 0] = 1.0; A[0, 1] = 0.0; A[0, 2] = 3.0; A[1, 0] = 2.0; A[1, 1] = 1.0; A[1, 2] = 0.0; A[2, 0] = 1.0; A[2, 1] = 0.0; A[2, 2] = 0.0; V.Matrix B = new V.Matrix(3, 3); B[0, 0] = 0.0; B[0, 1] = 1.0; B[0, 2] = 0.0; B[1, 0] = 1.0; B[1, 1] = 0.0; B[1, 2] = 0.0; B[2, 0] = 0.0; B[2, 1] = 1.0; B[2, 2] = 1.0; V.Matrix C = A * B; result += C.ToString(); V.Matrix D = B * A; result += D.ToString(); } } } /* 0 4 3 1 2 0 0 1 0 2 1 0 1 0 3 3 1 0 */