clear
%souradnice bodu
[x,y,z] = ndgrid(-1000:100:1000,-1000:100:1000,0:100:7000); %rozmery

souradnice=zeros(21*21*71,3);
for i=1:(21*21*71)
    souradnice(i,1)=x(i);
    souradnice(i,2)=y(i);
    souradnice(i,3)=z(i);
end
rozlozeni=[0,   1;
           5000,1;
           7500,0;
           8000,0];
tlak=zeros(21*21*71,1);

for i=1:(21*21*71)
    tlak(i)=interp1(rozlozeni(:,1), rozlozeni(:,2), souradnice(i,3));     
end

M=[souradnice,tlak];
dlmwrite('tlak_p_2.txt',M,',');



