% EXTRA DEMO:   CIRCLE DEMO (Fast Version)
%
% Program:      circle_demo_fast.m
% Written by:   
% For:          EE 311
%               Extra Demo For Computer Lab 1
% Date:         5-31-2001
% Purpose:      Computes and plots a unit circle
%               using complex exponentials.
%               Fast version which aviods explicit "for" loop.
clear all, hold off, clf reset, close all
j=sqrt(-1);
n=360;
theta=2*pi*[1:n]/n;         % Implicit 'for' loop
circle=exp(j*theta);
figure
axis('square')
hold on
plot(circle)
title('Circle Demo Fast')
xlabel('real part'), ylabel('imag part')
figure(gcf)
