// f06ya Example Program Text // C# version, NAG Copyright 2013 using System; using NagLibrary; using System.Globalization; namespace NagDotNetExamples { public class F06YJE { static void Main(String[] args) { StartExample(); } public static void StartExample() { try { double[,] a = { { 1, 2, 3 }, { 0, 5, 6 }, { 0, 0, 9 } }; double[,] b = { { 1, 1, 0, 1}, { 0, 1, 1, 0}, { 0, 0, 1, 1 } }; int m = a.GetLength(0); int n = b.GetLength(1); double alpha = 2.0; int ifail; string side = "L"; string uplo = "U"; string transa = "N"; string diag = "N"; F06.f06yj(side, uplo, transa, diag, m, n, alpha, a, b, out ifail); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { Console.Write("{0,12:f4} ", b[i, j]); } Console.WriteLine(""); } } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("Exception Raised"); } } } }