script11
% demonstration of the metropolis-hastings algorithm 
plotsurface('wigglyfn',[-10 10],[-10 10])
hold on
x=hastings('wigglyfn',[0 0],5,50000);
plot(x(:,1),x(:,2),'.')

