Main Content


Boolean intersection operation on two shapes



c = intersect(shape1,shape2) intersect shape1 and shape2 using the intersect operation. You can also use the & to intersect the two shapes.


collapse all

Create a default rectangle.

r = antenna.Rectangle;

Create a default circle.

c = antenna.Circle;

Use intersect to combine the shared surfaces of the rectangle and the circle.

rc = intersect(r,c)
rc = 
  Polygon with properties:

        Name: 'mypolygon'
    Vertices: [12x3 double]

axis equal

Figure contains an axes. The axes contains 2 objects of type patch. This object represents PEC.

Input Arguments

collapse all

Shapes created using custom elements and shape objects of Antenna Toolbox, specified as an object handle.

Example: c = intersect(rectangle1, rectangle2) where rectangle1 and rectangle2 are shapes created using antenna.Rectangle object.

Introduced in R2017a