Quadratic trend function.
f = poly2(x) [f, df] = poly2(x)
m*n matrix with design sites
[1 S S(:,1)*S S(:,2)S(:,2:n) ... S(:,n)^2]
derivatives(not implemented);
Second order polynomial trend function.
// 1D example // zero noise x_bound=[-2; 2]; X=(linspace(x_bound(1),x_bound(2),4))'; // Points of experiment YExp=sin(X);// Response values noise=0;theta=1; [kmodel] =km(X,YExp,poly2,'gaussian',theta,noise); [kmodel] =km(X,YExp,2,'gaussian',theta,noise);