I want to generate 50 random numbers (with both x and y coordinates) between 0 and 100, but they shouldn't be in the area of two yellow rectangles displayed in the figure.

Coordinates of rectangles are:

x1limit=[15,40];

y1limit=[40,70];

x2limit=[65,80];

y2limit=[15,60];

The attached figure is what I need.

Thanks in advance for your help.

More Fereshteh Abedini's questions See All
Similar questions and discussions