1234567891011121314151617181920212223242526272829303132 |
- using MathNet.Numerics.LinearAlgebra;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace _02_1_Approx
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- var A = Matrix<double>.Build.DenseOfArray(new double[,] {
- { 3, 2, -1 },
- { 2, -2, 4 },
- { -1, 0.5, -1 }
- });
- var b = Vector<double>.Build.Dense(new double[] { 1, -2, 0 });
- var x = A.Solve(b);
- }
- }
- }
|