% example1.m
% Plot 2sin(x) - cos(3x) + 0.1 sin(20x) over 0 <= x <= 4pi
%
%  Set the data pairs.
%
xlist = linspace ( 0.0, 4.0 * pi, 201 );
ylist = 2.0 * sin ( xlist ) - cos ( 3.0 * xlist ) + 0.1 * sin ( 20 * xlist );
%
%  Clear the screen.
%
clf
%
%  Draw with a BLUE (b) LINES (-).
%
plot ( xlist, ylist, 'b-', 'LineWidth', 3 );
%
%  Allow us to add more plots to same picture.
%
hold on
%
%  Add BLACK (k) DASHED LINES (--) from (0,0) to (4pi,0).
%
plot ( [ 0.0, 4.0 * pi], [0.0, 0.0], 'k--' );
%
%  We are done adding to our plot.
%
hold off
%
%  Add grid, title, labels.
%
grid on
title ( 'Example 1, 201 data points.', 'FontSize', 24 );
xlabel ( '<-- X -->' );
ylabel ( '<-- Y -->' );
%
%  Make x and y scale the same.
%
axis equal
%
%  Save a JPG copy of the plot.
%
print ( '-djpeg', 'example1.jpg' );