Background for the question
I am currently working on a Matlab code in which the systems of linear equations $Ax_1 = b_1$, $Ax_2 = b_2$, ... have to be solved. As the matrix $A$ is constant during the simulation, I LU-decompose it once and for all at the beginning and solve the $n$th system as
xn = U\(L\bn);
At this point it is probably worth mentioning that I only know the $b$-vectors one at a time, meaning that i cannnot solve the equations all at once.
As can be seen in the figures below, the matrices $L$ and $U$ very sparse and I therefore store them in sparse format. Moreover, they are upper an lower triangular. By looking at the documentation for the operator "\" it can be seen that Matlab will end up using a triangular solver to solve the systems. Before it gets to that, it however has to see if $L$ and $U$ are square, compute their bandwidth, see if they are diagonal, check if they look triangular and then finally check that they actually are triangular before using the triangular solver.
The actual question
My question is whether there is a way of bypassing all these checks and go directly to the triangular solver?
What have I tried so far
So far I have looked into the functions "linsolve" and creating upper and lower triangular solvers using "dsp.LowerTriangularSolver" and "dsp.UpperTriangularSolver". Unfortunately, all of these only work on full matrices.