Draw a rectangle
H = DRAWRECTANGLE(PARAM,STYLE)
This function draws a rectangle with the given parameters:
- inputs:
param................... 1x5 array
- param = [a, b, w, h, theta]
- (a,b): the center of the rectangle
- (w,h): width and height of the rectangle > 0
- theta: the rotation angle of the rectangle
style................... string
- plot style string
- output:
h....................... plot handler
Usage Examples,
DrawRectangle([0 0 1 1 0]);
DrawRectangle([-1,2,3,5,3.1415/6],'r-');
h = DrawRectangle([0,1,2,4,3.1415/3],'--');
Rasoul Mojtahedzadeh (mojtahedzadeh _a_ gmail com)
Version 1.00
November, 2011
Zitieren als
Rasoul Mojtahedzadeh (2025). Draw a rectangle (https://de.mathworks.com/matlabcentral/fileexchange/33767-draw-a-rectangle), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > 2-D and 3-D Plots > Polar Plots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.1.0.0 | - The problem with calculating the center of the rectangle has been solved. |
||
| 1.0.0.0 |
