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
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개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by