load CWMdata %% plot function from which noisy data were drawn. [XX,YY]=meshgrid(-2:.2:2, -2:.2:2); ZZ = exp(-XX.^2-YY.^2); figure(1); clf; rotate3d on; surf(XX,YY,ZZ);hold on; ax=axis; [D,N]=size(X); %% add datapoint to the plot. figure(1); plot3(X(1,:),X(2,:),X(3,:),'y.'); axis(ax); drawnow; % plot colorplot of noisy function (noisy in z direction only, noise in x-y plane not considered) ZZ2 = reshape(X(3,:),[sqrt(N),sqrt(N)]); figure(2); imagesc(ZZ2) drawnow;