%% 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.
rotateZ(r2,45);
show(r2)

%% 
% Copyright 2012 The MathWorks, Inc.