%Solution Problem 12
%
%x and y are given points for the way from start to finish
%
hold off
x=[-1.3, -1.25, -1.1, -0.6, -0.2, 0.3, 0.5, 0.75,1];
y=[1, 1.2, 0.9, 0.5, -0.1, 0.05, 0.5, 0.8, 1];
x1=-1.4:0.1:1.3;
x2=-0.3:0.1:1.3;
[X Y]=meshgrid(x1,x2);
Z=banan(X,Y);
figure(1)
surf(X,Y,Z)
title('The banana function')
%
figure(2)
[C h]=contour(X,Y,Z,50);
%clabel(C,h)
hold on
plot(x,y,'r',x,y,'o')
axis equal
title('The banana function')