sparse function is intrisically slow?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am building the sparse matrix using the function sparse(I,J,V,N,N)
I, J and V are already a column vector. I checked previous questions, it seems already being the best way. But, it takes extreamely long time if the size goes to 1E5.
Any way out? Thanks!
14 comentarios
James Tursa
el 12 de Mayo de 2020
OK. Are the values in the double vector stored in the same memory order as the sparse matrix columns? Can you give a small example of your indexing and values vector? I'm asking all of these questions to see if a mex routine could work for you.
Respuestas (1)
Robert
el 24 de Dic. de 2020
I was able to speed my sparse matrix build for very large problems by using sparse2.m (mexFunction) from SuiteSparse.
1 comentario
Yingzhi Liu
el 19 de Mzo. de 2022
I downloaded SuiteSparse, but I don't konw how sould I do to use sparse2.m in matlab. Can you help me list the steps after downloaded SuiteSparse? Thanks.
Ver también
Categorías
Más información sobre Sparse Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!