function Griff3_18sample
close all
res=50;
xrange=linspace(0,1,res);
yrange=linspace(0,1,res);
[X,Y]=meshgrid(xrange,yrange);

Z1=samplepot(X,Y,1,1,5);


surf(X,Y,Z1)
print( '-painters','-dpng', '-r300', 'Griff3_18' );
disp('You have an image file called Griff3_18.png.  Have a look!');
end

function[Vn]=samplepot(x,y,n,a,V0)
%This is obviously the wrong potential function
%Put the right one in
Vn=V0*n*x.*(x-y)/a;
end

