% SinePlot
% Displays the sine function across the interval
%[ 0,4pi] as a sequence of dots
% The number of dots...
N = input('Enter the number of sample points: ');
% The x-separation between the dots...
x_Spacing = 4*pi/N;
% The radius of the dots...
dot_Radius = x_Spacing/3;
% Draw background and x-axis as a very thin rectangle...
close all
figure
axis equal off
hold on
DrawRect(0,-1.2,4*pi,2.4,'w')
DrawRect(0,-.01,4*pi,.02,'k')
% add in the dots..
for k=0:N
x = k*x_Spacing;
y = sin(x);
DrawDisk(x,y,dot_Radius,'r')
end
hold off
shg