
close all

figure; pos=get(gcf,'pos'); pos(4)=pos(4)*0.75; set(gcf,'pos',pos);

x = linspace(-4,4);
y = normcdf(x);

subplot(1,2,1)
plot(x,y)
xlabel('x'); ylabel('\Phi(x)')

subplot(1,2,2)
plot(y,x)
xlabel('x'); ylabel('\Phi^{-1}(x)')

print('-deps2c','lec1a.eps')


figure; pos=get(gcf,'pos'); pos(4)=pos(4)*0.5; set(gcf,'pos',pos);

x = linspace(-4,4);
y = normpdf(x);

plot(x,y); hold on;
xlabel('x'); ylabel('\phi(x)')

for x0 = [0.25:0.5:3]
  y0 = normpdf(x0);
  plot([ x0  x0],[0 y0]);
  plot([-x0 -x0],[0 y0]);
  plot([ x0  x0-0.5],[y0 y0]);
  plot([-x0 -x0+0.5],[y0 y0]);
end


print('-deps2c','lec1b.eps')
