% DEMO:         USING EULER'S IDENTITY TO PLOT THE UNIT CIRCLE
%
% Program:      eulers_id.m
% Written by:   
% For:          EE 311
%               Demo for Computer Lab 1
% Date:         6-6-2001
% Purpose:      Computes and plots a unit circle
%               using exp(j*theta) and sweeping
%               theta through 0 to 2*pi radians
clear all, hold off, clf reset, close all
j=sqrt(-1);

theta=0:2*pi/100:2*pi;      % theta goes from 0 to 2*pi          
cir=exp(j*theta);
axis('square')
hold on
plot(real(cir),imag(cir));  % plot real part vs. imaginary part
title('The Unit Circle on the Complex Plane')
xlabel('real part'), ylabel('imag part')
