www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/SolveALowerTriangularMatrixExample.m

    %% 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).
%%
hlowtriang = dsp.LowerTriangularSolver;
u = tril(rand(4, 4));
b = rand(4, 1);

%%
% Check that result is the solution to the linear equations.
x1 = inv(u)*b
x = hlowtriang(u, b)