function [  ] = plotres( X, Y, Z, np, xl, yl, zl,i,name  )
    % This function prints the plot for a given set of perturbations and a
    % given input
    xlin = linspace(min(X),max(X),np);
    ylin = linspace(min(Y),max(Y),np);
    [x, y] = meshgrid(xlin,ylin);
    z = griddata(X',Y', Z', x,y,'cubic');

    figure(i)
    fig= figure(i);
    mesh(x,y,z)
    
    axis tight;
    hold on
    grid on
    
    
    
    FSz = 12;
    
    xlabel(xl,'FontSize', FSz)
    ylabel(yl,'FontSize', FSz)
    zlabel(zl,'FontSize', FSz)
    
    printfig(fig,name)
       
    
end

