A matrix is lower triangular if all elements above the main diagonal are zero. Any number of the elements on the main diagonal can also be zero.
For example, the matrix
is lower triangular. A diagonal matrix is both upper and lower triangular.
Tips
Use thetril函数产生lower triangular matrices for whichistrilreturns logical1(true).
The functionsisdiag,istriu, andistrilare special cases of the functionisbanded, which can perform all of the same tests with suitably defined upper and lower bandwidths. For example,istril(A) == isbanded(A,size(A,1),0).
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Code generation does not support sparse matrix inputs for this function.
GPU Code Generation Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
Code generation does not support sparse matrix inputs for this function.
GPU Arrays Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, seeRun MATLAB Functions on a GPU(Parallel Computing Toolbox).
Distributed Arrays Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.