% Plotting Exercises
% Example 1
x = 1:10
y = x.^2
plot(x, y)
plot(x, y, '.')
plot(x, y, '.r')
plot(x, y, '.green')

% Example 2
x = linspace(-2, 2)
y = x.^2
plot(x, y)

% Example 3
x = linspace(-2, 2)
y1 = x.^2 + 1;
y2 = exp(x);
plot(x, y1);
hold all;
plot(x, y2);
hold off;
legend({'y=x^2', 'y=e^x'});

% Example 4
x = linspace(-pi, 3*pi)
y1 = sin(x);
plot(x, y1, '.-');
hold all;

x = linspace(-pi, 3*pi, 1000)
y2 = sin(x);
plot(x, y2, '.-r');
hold off;
% Use the zoom button to get a 
% closer look at the two graphs


