Add missing step to explanation
This commit is contained in:
parent
ddf2fcbd36
commit
c6d7514752
1 changed files with 3 additions and 2 deletions
|
@ -856,13 +856,14 @@ Die $QR$-Zerlegung kann folgendermassen durchgeführt werden:
|
|||
3. Erweiterte Householder-Matrix als $Q_i$ speichern
|
||||
4. $R = Q_i \cdot R$
|
||||
5. $Q = Q \cdot Q_i^T$
|
||||
6. Die Gleichung $R \cdot x = Q^T \cdot b$ mit Gauss-Algorithmus lösen
|
||||
|
||||
***Code-Beispiel:***
|
||||
|
||||
```py
|
||||
from numpy import array, identity, sign, sqrt, square, sum, zeros
|
||||
|
||||
def qrDecomposition(A):
|
||||
def qrSolve(A, b):
|
||||
A = array(A)
|
||||
n = A.shape[0]
|
||||
R = A.reshape((n, n))
|
||||
|
@ -880,7 +881,7 @@ def qrDecomposition(A):
|
|||
Qi[i:,i:] = H
|
||||
R = Qi @ R
|
||||
Q = Q @ Qi.T
|
||||
return [Q, R]
|
||||
return linalg.solve(R, Q.T @ b)
|
||||
```
|
||||
|
||||
## Formelbuchstaben
|
||||
|
|
Loading…
Reference in a new issue