Given L
and U
LU decomposition and vector of constants b
such that LU*x=b
, is there any built in function which find the x
? Mean something like -
X = functionName(L,U,b)
Note that in both L
and U
we are dealing with triangular matrices which can be solved directly by forward and backward substitution without using the Gaussian elimination process.
Edit :
Solving this linear equation system should be according to the following steps -
1. define y - s.t Ux=y
2. solve Ly=b by forward substitution
3. solve Ux=y by backward substitution
4. return y
Edit 2 :
I found linalg::matlinsolveLU but I didn't try it cause I have too old version (R2010a
) . Is it working for anyone ?
mldivide
is overloaded for symbolic systems, but won't work exactly the same. – Fragilelinalg::matlinsolveLU
is in the Symbolic Toolbox. if yourL
andU
are floating point values, as opposed to having been creates viasym
orsyms
thenlinalg::matlinsolveLU
wouldn't work well for you anyways. – Fragile