mexSparseLogical0Diag
by Guy
27 Aug 2009
Change all the elements on the main diagonal of a logical sparse matrix to 0.
|
Watch this File
|
| File Information |
| Description |
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).
|
| MATLAB release |
MATLAB 7.8 (R2009a)
|
| Other requirements |
This is a mex file, it must be compiled to be used ("mex mexSparseLogical0Diag.c") |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Tag Activity for this File |
| Tag |
Applied By |
Date/Time |
| mex |
Guy |
27 Aug 2009 10:00:51 |
| sparse |
Guy |
27 Aug 2009 10:00:52 |
| logical |
Guy |
27 Aug 2009 10:00:52 |
|
Contact us at files@mathworks.com