Identify edge and corner element numbers

Identify the elements lying along edges and corners of a 2D (n x m) matrix
248 Downloads
Updated 18 Jan 2012

View License

With reference to the screenshot, the code extracts the element numbers of all points lying on:
1. elements lying between P and B, into the array "top"
2. elements lying between Q and D, into the array "right"
3. elements lying between R and F, into the array "bottom"
4. elements lying between S and H, into the array "left"
corners = [topleftelement toprightelement bottomrightelement bottomleftelement];

Cite As

sunil anandatheertha (2026). Identify edge and corner element numbers (https://www.mathworks.com/matlabcentral/fileexchange/34657-identify-edge-and-corner-element-numbers), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0