function ender=ad(x,Inter,num_knot,n_fun_over,disp_matrix,gener) ndim=length(x); for i=1:ndim I(i)=min(find(x(i)