필터 지우기
필터 지우기

Accessing sparse matrix components in MATLAB

조회 수: 2 (최근 30일)
Jason
Jason 2014년 8월 5일
답변: Christopher Berry 2014년 8월 12일
Hi, I'm just wondering if there is a way to access the sparse matrix components (ir, pr and jc) in MATLAB. I know that there are mex functions that allow you to access them but I couldn't find any way to access them from within matlab. Making mex functions to return the values is an option but seems inelegant. At the moment I'm just using find and generating the components from "find" but I'd prefer to access them directly because I'm using quite large matrices.
Thanks for your help

답변 (1개)

Christopher Berry
Christopher Berry 2014년 8월 12일
As far as I can tell (from looking through the documentation) there is not a quick and easy way to get access to sparse competent information inside MATLAB. Using find and calculating ir and jc yourself may be your best bet.
I'm curious though, what would you do with ir and jc even if you got them, since accessing sparse matrices inside MATLAB is best done using row,column indexing, just like (with some small exceptions) for full matrices?

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by