% example5.m
% Plot sin(5x) exp(-x/2) / (1+x^2) over -2 <= x <= 3
%
%  Set the data pairs.
%
xlist = linspace ( -2.0, 3.0, 201 );
ylist = sin ( 5 * xlist ) .* exp ( - xlist / 2 ) ./ ( 1 + xlist .^ 2 );
%
%  Clear the screen.
%
clf
%
%  Draw with a MAGENTA (m) LINES (-).
%
plot ( xlist, ylist, 'm-', 'LineWidth', 3 );
%
%  Allow us to add more plots to same picture.
%
hold on
%
%  Add BLACK (k) DASHED LINES (--) from (-2,0) to (3,0).
%
plot ( [ -2.0, 3.0], [0.0, 0.0], 'k--' );
%
%  We are done adding to our plot.
%
hold off
%
%  Add grid, title, labels.
%
grid on
title ( 'Example 5, 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', 'example5.jpg' );