Create rectangle centered at origin on X-Y plane
antenna.Rectangle object to create a rectangle
centered at the origin and on the X-Y plane. You can use
antenna.Polygon to create single-layer or multi-layered antennas
rect = antenna.Rectangle creates a rectangle centered
at the origin and on the X-Y plane.
rect = antenna.Rectangle(Name=Value) sets properties
using one or more name-value pair.
Name is the property
Value is the corresponding value. You can
specify several name-value arguments in any order as
ValueN. Properties not
specified retain their default values.
Name — Name of rectangle
"myrectangle" (default) | string | character vector
Name of rectangle, specified as a string or a character vector.
Center — Cartesian coordinates of center of rectangle
[0 0] (default) | 2-element vector
Cartesian coordinates of center of rectangle, specified as a 2-element vector with each element measured in meters.
Length — Rectangle length
1 (default) | scalar
Rectangle length, specified as a scalar in meters.
Width — Rectangle width
2 (default) | scalar
Rectangle width, specified as a scalar in meters.
NumPoints — Number of discretization points per side
2 (default) | scalar
Number of discretization points per side, specified as a scalar.
|Boolean unite operation on two shapes|
|Boolean subtraction operation on two shapes|
|Boolean intersection operation on two shapes|
|Shape1 + Shape2|
|Shape1 - Shape2|
|Shape1 & Shape2|
|Calculate area of shape in square meters|
|Display antenna, array structures or shapes|
|Plot boundary of shape|
|Mesh properties of metal, dielectric antenna, or array structure|
|Rotate shape about axis and angle|
|Rotate shape about x-axis and angle|
|Rotate shape about y-axis and angle|
|Rotate shape about z-axis and angle|
|Move shape to new location|
|Change the size of the shape by a fixed amount|
|Mirror shape along X-axis|
|Mirror shape along Y-axis|
|Remove holes from shape|
|Remove sliver outliers from boundary of shape|
Create Rectangle with Default Properties
Create a rectangle shape using antenna.Rectangle and view it.
r1 = antenna.Rectangle
r1 = Rectangle with properties: Name: 'myrectangle' Center: [0 0] Length: 1 Width: 2 NumPoints: 2
Create and Rotate Rectangle Using Specified Properties
Create and view a rectangle with a length of 2 m and a width of 4 m.
r2 = antenna.Rectangle(Length=2,Width=4); show(r2) axis equal
Rotate the rectangle.
Create Notched Rectangle
Create a rectangle with a length of 0.15 m, and a width of 0.15 m.
r = antenna.Rectangle(Length=0.15,Width=0.15);
Create a second rectangle with a length of 0.05 m, and a width of 0.05 m. Set the center of the second rectangle at half the length of the first rectangle r.
n = antenna.Rectangle(Center=[0.075,0],Length=0.05,Width=0.05);
Create and view a notched rectangle by subtracting n from r.
rn = r-n; show(rn)
Calculate the area of the notched rectangle.
ans = 0.0212
Introduced in R2017a