function plosny3Dgraf2
[X,Y]=meshgrid(linspace(-10,10,5),linspace(-8,8,5))
Z=X.^2+0.5.*Y.^2;
subplot(2,2,1)
mesh(X,Y,Z)
subplot(2,2,3)
contour(X,Y,Z)
%colorbar
[F,G]=gradient(Z);
hold on
quiver(linspace(-10,10,5),linspace(-8,8,5),F,G)
hold off
subplot(2,2,2)
mesh(X,Y,-Z)
subplot(2,2,4)
contour(X,Y,-Z)
%colorbar
[F,G]=gradient(-Z);
hold on
quiver(linspace(-10,10,5),linspace(-8,8,5),F,G)
hold off
disp(X)
disp(Y)
disp(Z)
end

