function kopec_prohluben
x=linspace(-10,10,10);
y=x;
[X,Y]=meshgrid(x,y);
Z=X.^2+0.5.*Y.^2;
subplot(2,2,1)
mesh(X,Y,Z)
xlabel('x')
ylabel('y')
zlabel('z')
subplot(2,2,3)
contour(X,Y,Z)
[F,G]=gradient(Z);
hold on
quiver(X,Y,F,G)
hold off
Z2=-(X.^2+0.5.*Y.^2);
subplot(2,2,2)
mesh(X,Y,Z2)
xlabel('x')
ylabel('y')
zlabel('z')
subplot(2,2,4)
contour(X,Y,Z2)
[F2,G2]=gradient(Z2);
hold on
quiver(X,Y,F2,G2)
hold off
disp(Z)
nazev=input('Zadej nazev souboru vcetne pripony: ','s');
f=fopen(nazev,'w');
for m=1:length(x)
    for n=1:length(y)
        % fprintf(f,'%9.3f\t',Z(m,n));
        fprintf(f,'%9.3f;',Z(m,n));
    end
    fprintf(f,'\n');
end
fclose(f);
retez=sprintf('Do souboru %s bylo zapsano', nazev);
msgbox(retez,'Oznameni','warn')
end