System object: dsp.LUFactor
Package: dsp

Decompose matrix into lower and upper triangular matrices


[LU,P] = step(lu,A)
[LU,P,S] = step(lu,A)



Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

[LU,P] = step(lu,A) decomposes the matrix A into lower and upper triangular matrices. The output LU is a composite matrix with lower triangle elements from L and upper triangle elements from U . The permutation vector P is the second output.

[LU,P,S] = step(lu,A) returns an additional output S indicating if the input is singular when the ExceptionOutputPort property is set to true.


obj specifies the System object on which to run this step method.

The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties (MATLAB) and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.