Accessing sparse matrix components in MATLAB

2 views (last 30 days)
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

Answers (1)

Christopher Berry
Christopher Berry on 12 Aug 2014
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?

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!