% To load into Matlab:  just type the name of this file, without the .m
% extension.

clf;

xmin= 0;
xmax= 10;
ymin=-2;
ymax= 6;

nfine = 512;
ncoarse = 8;

x=[ xmin:(xmax-xmin)/nfine:xmax];
y = 2+3*sin(pi*x/2+1);
plot(x,y);
hold on;

axis([xmin xmax ymin ymax]);
h1=line([xmin xmax], [0 0]);
set(h1, 'LineStyle', '--');
h2=line([0 0], [ymin ymax]);
set(h2, 'LineStyle', '--');

set(gca, 'XTick', [xmin:1:xmax])
set(gca, 'YTick', [ymin:1:ymax])

set(gcf, 'PaperPositionMode', 'Manual');
set(gcf, 'PaperPosition', [0 0 7.0 1.5])
print -depsc e2f1

