You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Many MATLAB and Toolbox functions require the specification of rectangular regions. Several use "position vectors," specified as [Xmin Ymin Width Height], many others require specification by vertex, [x; y]. For rectangular ROIs, either one defines the other. This submission facilitates easy conversion from position to vertex:
verts = posToVert(posn);
or from vertices to position:
posn = vertToPos(vert);
Simple, but useful.
Cite As
Brett Shoelson (2026). Convert Position Vectors to Vertices, and Vice Versa! (https://www.mathworks.com/matlabcentral/fileexchange/48728-convert-position-vectors-to-vertices-and-vice-versa), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.1 (2.86 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
