function [ni,x]=pred(xmin,xmax,f,errnorm,tol)
disp('pred')
l=xmax-xmin;
l2=l*l;
ni=max(5,round(sqrt(0.2*l/tol)));
if errnorm=='en';
ni=ni*ni;
end
dx=l/ni;
x=[xmin:dx:xmax];

