
load data

% crtanje u 3d
scatter3(x,y,z)

% interpolacija
F = scatteredInterpolant(x,y,z, 'nearest');


% generisemo neke tačke
xdiff = x(2) - x(1);
ydiff = y(2) - y(1);
xtest = x(end):xdiff:x(end)+10*xdiff;
ytest = y(end):ydiff:y(end)+10*ydiff;
xtest = xtest';
ytest = ytest';

% interpoliramo
zt = F([xtest,ytest]);

% nacrtamo nove tačke zeleno
hold on;
scatter3(xtest,ytest,zt,'g');