Main Content

plus

Join two shapes

Description

example

plus(shape1,shape2) joins the shape1 with shape2 and plots the resultant shape. Alternatively, you can also use the '+' operator to join the shapes.

example

c = plus(shape1,shape2) joins the shape1 with shape2 and returns a polygon object for resultant 2-D shape or a custom 3-D object for resultant 3-D shape. Alternatively, you can also use the '+' operator to join the shapes.

Examples

collapse all

Create and join a rectangular and a circular shape.

r = antenna.Rectangle;
c = antenna.Circle; 
plus(r,c);

Alternatively, you can directly join shapes using the '+' operator.

r + c;

Create and join a box and a custom 3-D shape.

b = shape.Box;
c = shape.Custom3D; 
s = plus(b,c)
s = 
  Custom3D with properties:

            Name: 'custom3D'
        Vertices: [23x3 double]
           Metal: 'PEC'
      Dielectric: 'Air'
           Color: 'Individual'
    Transparency: 'Individual'
       EdgeColor: 'Individual'

Alternatively, you can directly join shapes using the '+' operator.

b + c;

Input Arguments

collapse all

2-D and 3-D geometric shapes created using shape objects in Custom 2-D and 3-D Antenna.

Example: antenna.Rectangle,antenna.Circle

Example: shape.Box,shape.Custom3D

Output Arguments

collapse all

Shape obtained after uniting two 2-D or 3-D shapes.

Example: antenna.Polygon

Example: shape.Polygon

Example: shape.Custom3D

Version History

Introduced in R2017a