function rot( theta )
%ROT  Prints a rotated sine wave.
rads = theta / 180 * pi; % degrees to radians
rotmat = [ cos(rads) sin(rads); ...
    -sin(rads)   cos(rads) ];
pts = 0 : pi/20 : 4*pi ;
data = rotmat * [pts/(4*pi); cos(pts)];
plot(data(1,:), data(2,:))
axis([-1.5 1.5 -1.5 1.5])

end

