mexSparseLogical0Diag
Because of memory constraints, it is often impossible to change by subscript all the elements of a large sparse matrix to zero. This leads to changing the elements in a loop, which is horrendously slow.
This mex solves that problem.
Usage: B = mexSparseLogical0Diag(A).
This problem is very common when dealing with adjacency matrices used in clustering - an adjacency matrix is a logical matrix, where the main diagonal is all zeros (no element is a neighbour of itself).
Cite As
Guy (2024). mexSparseLogical0Diag (https://www.mathworks.com/matlabcentral/fileexchange/25147-mexsparselogical0diag), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Sparse Matrices >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |