How to create a rectangular patch with a smaller rectangular section removed?

Hi,
How can I patch (using patch command) a rectangle with a smaller rectangular section removed? The smaller rectangle can be on the side or the center, so I don't know what the remaining patch shape will look like. Any ideas?

 Accepted Answer

Can't you simply call patch twice, the second time with smaller size and the background color? Or did you try that already? I assume you looked up patch() in the help. So what have you tried so far that did not work? Is this homework?

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!