Main Content

dsp.LowerTriangularSolver

(Removed) Solve lower-triangular matrix equation

dsp.LowerTriangularSolver has been removed. Use the mldivide function or the \ operator instead. For more information, see Compatibility Considerations.

Description

The LowerTriangularSolver object solves LX = B for X when L is a square, lower-triangular matrix with the same number of rows as B.

To solve LX = B for X:

  1. Create the dsp.LowerTriangularSolver object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

example

lowtriang = dsp.LowerTriangularSolver returns a linear system solver, lowtriang, used to solve the linear system LX = B, where L is a lower (or unit-lower) triangular matrix.

lowtriang = dsp.LowerTriangularSolver(Name,Value) returns a linear system solver, lowtriang, with each specified property set to the specified value.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

When you set this property to true, the linear system solver replaces the elements on the diagonal of the input, L, with ones. This property is useful when matrix L is the result of another operation, such as an LDL decomposition, that uses the diagonal elements to represent the D matrix.

When you set this property to true, the linear system solver optimizes computation speed if the input L is complex, but its diagonal elements are real. Set this property to either true or false.

Dependencies

This property applies only when you set the OverwriteDiagonal property to false.

Fixed-Point Properties

Specify the rounding method as Ceiling, Convergent, Floor, Nearest, Round, Simplest, or Zero.

Specify the overflow action as Wrap or Saturate.

Specify the product data type as Full precision, Same as input, or Custom.

Specify the product fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the ProductDataType property to Custom.

Specify the accumulator data type as Full precision, Same as first input, Same as product, or Custom.

Specify the accumulator fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the AccumulatorDataType property to Custom.

Specify the output data type as Same as first input or Custom.

Specify the output fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the OutputDataType property to Custom.

Usage

Description

example

X = lowtriang(L,B) computes the solution, X, of the matrix equation LX = B, where L is a square, lower-triangular matrix with the same number of rows as the matrix B.

Input Arguments

expand all

Lower-triangular square matrix of size M-by-M.

If the matrix is of fixed-point data type, it must be signed fixed point.

Data Types: single | double | int8 | int16 | int32 | int64 | fi

Input B in the equation LX = B, where B is an M-by-N matrix.

If the matrix is of fixed-point data type, it must be signed fixed point.

Data Types: single | double | int8 | int16 | int32 | int64 | fi

Output Arguments

expand all

Solution of the LX = B equation, returned as an M-by-N output matrix. The object uses only the elements in the lower triangle of input L and ignores the upper elements. When you set OverwriteDiagonal to true, the object replaces the elements on the diagonal of the input, L, with ones.

If the matrix is of fixed-point data type, it must be signed fixed point.

Data Types: single | double | int8 | int16 | int32 | int64 | fi

Object Functions

To use an object function, specify the System object™ as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

rng(1);
lowtriang = dsp.LowerTriangularSolver;
u = tril(rand(4,4));
b = rand(4,1);

Check that result is the solution to the linear equations.

x1 = u\b
x1 = 4×1

    1.0007
   -1.7557
    1.1148
   -0.3901
x = lowtriang(u,b)
x = 4×1

    1.0007
   -1.7557
    1.1148
   -0.3901

Algorithms

This object implements the algorithm, inputs, and outputs described on the Forward Substitution block reference page. The object properties correspond to the block parameters.

Extended Capabilities

Version History

Introduced in R2012a

expand all

R2023a: dsp.LowerTriangularSolver System object has been removed

The dsp.LowerTriangularSolver System object has been removed. Use the mldivide function or the \ operator instead.

Update Code

This table shows how to update existing code to use the mldivide function or the \ operator.

Discouraged UsageRecommended Replacement
rng(1);
lowtriang = dsp.LowerTriangularSolver;
u = tril(rand(4,4));
b = rand(4,1);
x = lowtriang(u,b)
x = 4×1
    1.0007
   -1.7557
    1.1148
   -0.3901
x1 = u\b
x1 = 4×1
    1.0007
   -1.7557
    1.1148
   -0.3901

Alternatively, you can also use the mldivide function.

x1 = mldivide(u,b)
x1 = 4×1
    1.0007
   -1.7557
    1.1148
   -0.3901

See Also

Objects