MATRICI GENERATE ---------------- * Toate matricile generate sunt de tip "general": n x n Data de intrare comuna: n = ordinul matricii A 1. HILBERT Formula: A(i,j) = 1. /(i +j -1) Matricea (A = Hn): 1 1/2 ... 1/n 1/2 1/3 ... 1/(n+1) .... ... ... ... 1/n 1/(n+1) ... 1/(2n-1) 2. LOTKIN (A = Ln) Aceeasi cu Hilbert, dar prima linie cu 1. Matricea (A = Ln): 1 1 ... 1 1/2 1/3 ... 1/(n+1) .... ... ... ... 1/n 1/(n+1) ... 1/(2n-1) 3. COMPANION n = gradul polinomului p(x) = x^n +a_(n-1)*x^(n-1) +... +a_2*x2 +a_1*x +a_0 Matricea (A = C): 0 0 0 ... -a_0 1 0 0 ... -a_1 0 1 0 ... -a_2 ... ... ... ... 0 0 0 ... 0 -a_(n-2) 0 0 0 ... 1 -a_(n-1) 4. WILKINSON_5 (Wilkinson - ordin 5) n = 5 Intrare: z (real) Formula: A(i,j) = z*1.8144/(i +j +1) Exemplul z =1.: Matricea (A = W5): 0.604800 0.453600 0.362880 0.302400 0.259200 0.453600 0.362880 0.302400 0.259200 0.226800 0.362880 0.302400 0.259200 0.226800 0.201600 0.302400 0.259200 0.226800 0.201600 0.181440 0.259200 0.226800 0.201600 0.181440 0.164945 Nota: matricea W5 este Hilbert scalata. 5. WILKINSON_20 (Wilkinson - ordin 20) n = 20 Intrare: alfa Generare: alpha =1D-10 a = 0. do i =1,n a(i,i) =float(i) if(i <=n-1) a(i,i+1) =float(n) enddo a(n,1) = alpha Matricea (A = W20; elementele nescrise sunt 0): 1 20 . . . . . . 2 20 . . . . . . 3 20 . . . . . . . . . . . . . . . . . . . . . . 19 20 alfa . . . . . 20 6. CAUCHY Intrare: X(n), Y(n) = vectori care definesc A. Formula: A(i,j) = 1./(X(i) +Y(j)) Exemplu: n = 5 X = (1, 3, 5, 8, 7), Y = (2, 4, 6, 10, 9) Matricea (A): 1/3 1/5 1/7 1/11 1/10 1/5 1/7 1/9 1/13 1/12 1/7 1/9 1/11 1/15 1/14 1/10 1/12 1/14 1/18 1/17 1/9 1/11 1/13 1/17 1/16 7. BANDA Intrare: nc =semi-latimea de banda (inclusiv elementul diagonal) c = semi-banda dreapta ( c(1) = elementul diagonal) Nota: Matricea este simetrica, dar va fi declarata de tip "general" (n x n). Exemplu: Intrare: nc = 3 semi-banda = 4 1 1 Matricea A 4 1 1 0 0 1 4 1 1 0 1 1 4 1 1 0 1 1 4 1 0 0 1 1 4 ------------------------------------------