% sine_5.m
% Plot sin(x) using 5 data values.
%
%  Set the 5 data pairs.
%
xlist = [ 0.0, pi/2, pi, 3*pi/2, 2*pi ];
ylist = [ 0.0, 1.0, 0.0, -1.0, 0.0 ];
%
%  Clear the screen.
%
clf
%
%  Draw with a GREEN (g) LINES (-).
%
plot ( xlist, ylist, 'g-', 'LineWidth', 5 );
%
%  Allow us to add more plots to same picture.
%
hold on
%
%  Add RED (r) circles (O) at data values.
%
plot ( xlist, ylist, 'ro' );
%
%  Add BLACK (k) DASHED LINES (--) from (0,0) to (2*pi,0).
%
plot ( [ 0.0, 2*pi], [0.0, 0.0], 'k--' );
%
%  We are done adding to our plot.
%
hold off
%
%  Add a title.
%
title ( 'y=sin(x), 5 data points.' );
%
%  Save a JPG copy of the plot.
%
print ( '-djpeg', 'sine_5.jpg' );