MATLAB: How to plot geometric figures

geometic shapes

Dear sir/madam,
I am working on geometric shapes. I need to plot geometric shapes like square, rectangle, triangle etc… in matlab. How could I do this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD

Best Answer

Consider also patch()
rectangle() can be used to plot squares, rectangles, ellipses, and circles.