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.
Are you able to just keep a vector of the figure handles (for A and B separately) as you create them, such that you can close the ones you want? For example,
>> handleA(1) = figure;
>> handleA(2) = figure;
>> % etc
>> handleB(1) = figure;
>> handleB(2) = figure;
>> % etc
Then, to close only A figures, you can do
>> close(handleA)
I guess I'm having trouble understanding your use case.
Also, regarding closing all figures, is there a reason you don't just use
Best Answer