public static void Eigenvector double double int double double double

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
public static void Eigenvector(double[,] A, double[] l, int n, double[,] E, double[] b)
{
double[,] L = new double[n, n];
double[,] U = new double[n, n];
double[,] At = new double[n, n];
double[,] Et = new double[n, n];
double temp = 0;
int count = 0;
double[] y = new double[A.GetLength(0)];
for (int i = 0; i < l.Length; i++)
{
deleteArray(y);
for (int k = 0; k < 25; k++)
{
copyMtx(A, At);
copyMtx(E, Et);
MultyMtxOnValue(Et, l[i]);
At = SubtractionMtx(At, Et);
copyMtx(At, U);
LUpartition(n, L, U);
y = LUSolving(L, U, b);
temp = Temp(b, y);
for (int j = 0; j < b.Length; j++)
{
b[j] = y[j] / norma(y);
}
l[i] = l[i] + temp;
deleteMtx(At);
deleteMtx(Et);
}
count++;
Console.WriteLine("Для собственного значения l{0} = {1}\n\nСобственный вектор X{0} равен\nX{0} = ", count, l[i]);
for (int t = 0; t < y.Length; t++)
Console.Write("{0:f4} ", b[t]);
Console.WriteLine("\n------------------------------------------\n");
}
}