function prohluben_kopec
% plosne grafy
x=linspace(-10,10,7);
y=x;
[X,Y]=meshgrid(x,y);
Z=X.^2+0.5.*Y.^2;
subplot(2,2,1)
mesh(X,Y,Z)
subplot(2,2,3)
contour(X,Y,Z)
hold on
[Fx,Fy]=gradient(Z);
quiver(x,y,Fx,Fy)
hold off
subplot(2,2,2)
mesh(X,Y,-Z)
subplot(2,2,4)
contour(X,Y,-Z)
hold on
[Fx,Fy]=gradient(-Z);
quiver(x,y,Fx,Fy)
hold off
end

