Accessing sparse matrix components in MATLAB
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Christopher Berry
le 12 Août 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?
0 commentaires
Voir également
Catégories
En savoir plus sur Sparse Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!