New answers tagged linear-algebra
3
votes
Implementation of the Lanczos algorithm
The Lanczos algorithm is unstable, therefore we can't test it on arbitrary matrix. Next example shows that you code is valid
...
1
vote
Accepted
How can I linearize this equation system?
Suppose $s_i\cos(\alpha)+c_i\sin(\alpha)\ne 0$ and $c_i\cos(\alpha) - s_i\sin(\alpha) \ne 0$, then you can solve both equations for $u_i$:
\begin{gather}\frac{y_i-y_0-t_iV_y}{s_i\cos(\alpha)+c_i\sin(\...
7
votes
Why does this implementation of the Block Tridiagonal Thomas algorithm give such large errors?
10^-2 likely means you have a mistake in your formulas, not just an accuracy problem. There is no simple and painless solution: you'll have to grab a cup of coffee, sit down, and figure out where the ...
3
votes
Why does this implementation of the Block Tridiagonal Thomas algorithm give such large errors?
There are a lot of reasons, why your custom implemented code may not reach the performance of the standard solvers.
Immediate Observations from your code:
Repeated calculations and inplace ...
Top 50 recent answers are included
Related Tags
linear-algebra × 1174matrix × 282
linear-solver × 142
eigenvalues × 118
numerics × 93
sparse-matrix × 93
iterative-method × 88
eigensystem × 85
optimization × 83
algorithms × 74
python × 60
matlab × 59
lapack × 59
matrix-factorization × 52
svd × 41
parallel-computing × 39
blas × 39
least-squares × 37
c++ × 36
finite-element × 34
preconditioning × 33
performance × 32
krylov-method × 30
finite-difference × 28
linear-system × 27