ruth(X(1,:),X(2,:),X(3,:))+1e-2*randn(1,size(X,2));

[xeva yeva zeva] = meshgrid(-3:0.5:3,-3:0.5:3,-3:0.2:3);
xstar = [xeva(:)';yeva(:)';zeva(:)'];

figure; scatter3(X(1,:),X(2,:),X(3,:),40,y,<span class="string">'filled'</span>)
xlabel(<span class="string">'x'</span>);ylabel(<span class="string">'y'</span>);zlabel(<span class="string">'z'</span>); title(<span class="string">'Training Data'</span>)

pause
</pre><img vspace="5" hspace="5" src="demo3D_01.png" alt=""> <h2>Set up Gaussian process<a name="4"></a