How can I use LINSOLVE function with sparse matrices?
5 次查看(过去 30 天)
显示 更早的评论
I would like to use the command LINSOLVE with sparse matrices. When I run the following code:
A = triu(rand(5,3));
x = [1 1 1 0 0]';
b = A'*x;
opts.UT = true; opts.TRANSA = true;
S = sparse(A);
y2 = linsolve(S,b,opts);
I receive the following error:
??? Error using ==> linsolve
Linsolve is currently not supported for sparse inputs
采纳的回答
MathWorks Support Team
2009-6-27
The ability to use LINSOLVE function with sparse matrices is not available in MATLAB R2007a Prerelease.
As a workaround, you can use MLDIVIDE(\) or MRDIVIDE(/) operators on your sparse matrices.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!