The following snippet fails to produce the expected result:
x = [ 1.00 1.50 2.00 3.00 5.00 7.00 10.00 13.00 18.00]';
z = [ 0.06 0.06 0.05 0.05 0.04 0.04 0.04 0.04 0.03]';
gp_prior = stk_model (@stk_materncov52_iso);
gp_prior.lognoisevariance = nan; % assume noisy data
gp_posterior = stk_model_gpposterior (gp_prior, x, z);
x_box = stk_hrect([0; 20], {'t'});
x_pred = stk_sampling_regulargrid (100, [], x_box);
z_pred = stk_predict (gp_posterior, x_pred);
stk_plot1d (x, z, x_pred, [], z_pred); legend show
The reason is that gp_posterior.prior.lognoisevariance is still NaN, because stk_model_gpposterior fails to detect that this parameter must be estimated too.
This is easy to fix.
Done:
https://sourceforge.net/p/kriging/hg/ci/c9ea9b65dab8c9bda4f159f477b4e56aa2b07b74/