Factor square matrix into lower and upper triangular matrices
The LUFactor object factors a square matrix into lower and upper triangular matrices.
To factor a square matrix into lower and upper triangular matrices:
H = dsp.LUFactor returns an LUFactor System object, H, which factors a row permutation of a square input matrix A as , where L is the unit-lower triangular matrix, and U is the upper triangular matrix. The row-pivoted matrix Ap contains the rows of A permuted as indicated by the permutation index vector P. The equivalent MATLAB® code is Ap = A(P,:).
H = dsp.LUFactor('PropertyName',PropertyValue,...) returns an LUFactor object, H, with each specified property set to the specified value.
Set to true to output singularity of input
Set this property to true to output the singularity of the input as logical data type values of true or false. An output of true indicates that the current input is singular, and an output of false indicates the current input is nonsingular.
|clone||Create LU Factor object with same property values|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs of step method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|step||Decompose matrix into lower and upper triangular matrices|
Decompose a square matrix into the lower and upper components:
hlu = dsp.LUFactor; x = rand(4) [LU, P] = step(hlu, x); L = tril(LU,-1)+diag(ones(size(LU,1),1)); U = triu(LU); y = L*U % Check back whether this equals the permuted x xp = x(P,:)
This object implements the algorithm, inputs, and outputs described on the LU Factorization block reference page. The object properties correspond to the block parameters.