Skip to content

Commit

Permalink
add least norm solution to first example
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxenceGollier committed Aug 1, 2024
1 parent 70e8e0c commit a67eb9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/src/tutorials/qless.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@ qrm_solve!(spfct, b, y₁; transp='t')
qrm_solve!(spfct, y₁, y₂; transp='n')
# Overall, RᵀRy₂ = b. Equivalently, RᵀQᵀQRy₂ = b or AAᵀy₂ = b
# Compute least norm solution of min ‖b - Ax‖
x = A'*y₂
# Compute error norm and residual norm
error_norm = norm(y₂ - y_star)
residual_norm = norm(b - A*x)
@printf("Error norm ‖y* - y‖ = %10.5e\n", error_norm)
@printf("Residual norm ‖b - Ax‖ = %10.5e\n", residual_norm)
```

```@example qless2
Expand Down

0 comments on commit a67eb9e

Please sign in to comment.