% EXTRA DEMO:   POLAR PLOTS ON THE COMPLEX PLANE
%
% Program:      polar_plots_polar.m
% Written by:   
% For:          EE 311
%               Extra Demo Computer Lab 1
% Date:         5-31-2001
% Purpose:      This program plots:  
%               cos(n*theta)*exp(j*theta) vs. theta for n=1:10; 
%               on the complex plane in polar coordinates for
%               each value of n.
clear all, close all

j=sqrt(-1);
theta=(0:pi/100:2*pi);

for n=1:10
    figure              % Creates a new figure window
    polar(0,0)          % To keep the polar coordinates
    hold on             % Changes the hold property from off to on
    grid                % Puts a grid on the current figure
    axis([-1.2 1.2 -1.2 1.2])   % Leave room for a title
    s=['cos(' num2str(n) '\theta) * \it{e}^{(j\theta)}'];
    title(s)
    xlabel('real axis'), ylabel('imag axis')
    z=cos(n*theta).*exp(j*theta);
    polar(angle(z),abs(z))      % Polar plot of the function
end


