Main Content

rotateZ

Rotate shape about z-axis by angle

Description

example

rotateZ(shape,angle) rotates the shape about z-axis by an angle and plots the resultant shape.

c = rotateZ(shape,angle) rotates the shape about z-axis by an angle and returns a shape object.

Examples

collapse all

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

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, myrectangle.

Rotate the rectangle.

rotateZ(r2,45);

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, myrectangle.

show(r2)

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, myrectangle.

Input Arguments

collapse all

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

Example: antenna.Rectangle

Example: shape.Polygon

Example: shape.Box

Angle of rotation, specified as a scalar in degrees.

Example: 45

Data Types: double

Output Arguments

collapse all

Resultant shape obtained after the rotation operation on the input shape, returned as a shape object.

Example: antenna.Rectangle

Example: shape.Polygon

Example: shape.Box

Version History

Introduced in R2017a