% example4.m
% Plot ( 0.2 x^3 - x ) / ( 1.1 + cos(x) ) over -8 <= x <= 8
%
%  Set the data pairs.
%
xlist = linspace ( -8.0, 8.0, 201 );
ylist = ( 0.2 * xlist.^3 - xlist ) ./ ( 1.1 + cos ( 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 (-2,0) to (3,0).
%
plot ( [ -8.0, 8.0], [0.0, 0.0], 'k--' );
%
%  We are done adding to our plot.
%
hold off
%
%  Add grid, title, labels.
%
grid on
title ( 'Example 4, 201 data points.', 'FontSize', 24 );
xlabel ( '<-- X -->' );
ylabel ( '<-- Y -->' );
%
%  Save a JPG copy of the plot.
%
print ( '-djpeg', 'example4.jpg' );