Is there a list describing how \ (left division) achieves its result and what matrices it recognizes in MATLAB?
2 次查看(过去 30 天)
显示 更早的评论
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?
采纳的回答
MathWorks Support Team
2019-3-1
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!