rectangle2

Similar to Matlab's rectangle() but with more options.

Download
Download

You are now following this Submission

Cite As

Adam Danz (2026). rectangle2 (https://www.mathworks.com/matlabcentral/fileexchange/85418-rectangle2), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
2.0.0

Most inputs including name-val pairs are auto-expanded. Rect.verts is in plotting order. Outputs are suppressed unless requested. Fixed error when detecting Face|Edge props. Using Matlab defaults for missing name-vals. New example file.

Download
1.1.0

Produces patch obj instead of rectangle; specity 1 WH for multiple CNT inputs; accounting for Face vertices; cleaner handling of parent handle and hold-state.

Download
1.0.0

Download