sparse function is intrisically slow?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
James Tursa
2020-5-12
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.
回答(1 个)
Robert
2020-12-24
I was able to speed my sparse matrix build for very large problems by using sparse2.m (mexFunction) from SuiteSparse.
1 个评论
Yingzhi Liu
2022-3-19
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Performance and Memory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!