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

    %% Test Lower Triangular Matrix  

%% 
% Create a 5-by-5 matrix. 
D = tril(magic(5))  

%% 
% Test |D| to see if it is lower triangular. 
istril(D) 

%%
% The result is logical |1| (|true|) because all elements above the main
% diagonal are zero.