|
|
| File Information |
| Description |
ISLANDS finds all "islands" which are 4-connected components in a matrix. The function will return three output arguments, including the largest connected island in the input matrix. See the detailed help for all descriptions.
Inspired by a recent puzzler posted here:
http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/
and by the submission from Tim Davis.
Also included is a MEX-File version which runs faster than the M-File version.
Tested on 2007a and 2007b.
Please email me about bugs and other concerns. Thanks. |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
find_components
|
| MATLAB release |
MATLAB 7.5 (R2007b)
|
| Zip File Content |
|
| Other Files |
Islands/humor.mat, Islands/islands.m, Islands/islandsmx.cpp, Islands/islandsmx.m, Islands/islandsmx.mexw32
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 15 Sep 2008 |
Richard B.
|
|
|
| 31 Oct 2008 |
Tim Davis
|
|
|
| Updates |
| 11 Sep 2008 |
Added more input checking. |
| 18 Sep 2008 |
Faster mex-file. |
| 19 Sep 2008 |
M-File now twice as fast. |
| 23 Sep 2008 |
Now 3 times faster for a large binary matrix. |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com