Main Content

mirrorX

Mirror shape along x-axis

Since R2022a

Description

mirrorX(shape) mirrors a shape along the x-axis.

example

mirroredshape = mirrorX(shape) stores the mirrored shape in a shape object.

example

Examples

collapse all

Create a Dumbell shaped patch by performing operations on a circular and a rectangular shape.

Create patch shape and view it

Use antenna.Circle and antenna.Rectangle to create a patch shape and view it.

c1 = antenna.Circle(Center=[0 1],Radius=0.5);
c2 = antenna.Rectangle(Center=[0 0.25],Length=0.3,Width=1);
cm = c1 + c2;
show(cm)

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Mirror the shape along x-axis

Use mirrorX to create a mirror image of the shape along x-axis and view it.

cmm = mirrorX(cm);
show(cmm)

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Add both shapes to create Dumbell shape

Add the original shape and its mirror image along x-axis to create a Dumbell shape and view it.

c3 = c1 + c2 + cmm;
show(c3)

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Input Arguments

collapse all

Shape to mirror, specified as antenna.Shape object. You can specify rectangular, circular, elliptical, triangular, or polygon shape.

Example: antenna.Polygon

Output Arguments

collapse all

Mirrored shape stored as an antenna.Shape object.

Version History

Introduced in R2022a