%% Solve a Lower Triangular Matrix
% Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

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
x = lowtriang(u, b)

% Copyright 2012 The MathWorks, Inc.