Introduction - If you have any usage issues, please Google them yourself
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).