Is there a list describing how \ (left division) achieves its result and what matrices it recognizes in MATLAB?
3 views (last 30 days)
Show older comments
Is there a list describing how \ (left division) achieves its result and what matrices it recognizes in MATLAB?
When using the backslash (\) operator, what classes of square matrices does MATLAB recognize and treat separately?
I know that it determines if the matrix is triangular, but what about diagonal matrices and the identity?
Accepted Answer
MathWorks Support Team
on 1 Mar 2019
The algorithm for the left-hand division operator is shown at the following:
Triangular matrices are recognized and their sets of linear equations are solved by forward or back substitutition. This requires only O(n^2) flops, in contrast to the O(n^3) flops for general matrices.
Diagonal matrices, including the identity, are treated as triangular by the full backslash and as sparse matrices with only 'n' nonzeros by the sparse operations.
0 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!