MATLAB: How to create a rectangular patch with a smaller rectangular section removed

patch command

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?

Best 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?
Related Question