MATLAB: Rotating a 2D plot around origo

mirrorplotrotate plot

Hello, I am trying to rotate the plot for a propeller blade about origo.
% code
endang=0:0.01:2*pi;
xp=rboss*cos(ang);
yp=rboss*sin(ang);
plot(0+xp,0+yp, 'b');
grid on
hold on
blade1 = plot(r, c./4, 'b', r, -c./4, 'b');
hold on
In this plot I wish to rotate blade1 three times, so the finished plot will look like a propeller. How do i rotate the blade?

Best Answer

rotate(h,direction,alpha)
rotates the graphics object h by alpha degrees. direction is a two- or three-element vector that describes the axis of rotation in conjunction with the origin of the axis of rotation. The default origin of the axis of rotation is the center of the plot box. This point is not necessarily the origin of the axes.
Positive alpha is defined as the righthand-rule angle about the direction vector as it extends from the origin of rotation.
More detail is here
Related Question