Skip to main content

New answers tagged

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 ...
Alex Trounev's user avatar
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(\...
lightxbulb's user avatar
  • 2,872
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 ...
Federico Poloni's user avatar
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 ...
ThivinAnandh's user avatar

Top 50 recent answers are included