% % Example on epage XXX % % Problem on epage 517 % % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; clc; addpath('../../Code/CSTool'); randn('seed',0); rand('seed',0); load uganda X = [x,y]; %h = 220; h = 100; % <- produces a very "spiky" surface [xl,yl,lamhat] = csintkern(X,ugpoly,h); figure; imagesc(xl(:,1),yl(1,:),lamhat); axis xy; map = gray(256); map = flipud(map); % Flip the colormap so zero is white and max is black. colormap(map); saveas( gcf, '../../WriteUp/Graphics/Chapter12/prob_12_2_h_100', 'epsc' ); h = 500; % <- produces a very broad surface [xl,yl,lamhat] = csintkern(X,ugpoly,h); figure; imagesc(xl(:,1),yl(1,:),lamhat); axis xy; map = gray(256); map = flipud(map); colormap(map); colorbar; saveas( gcf, '../../WriteUp/Graphics/Chapter12/prob_12_2_h_500', 'epsc' ); clear functions;