function sheet03

%
% sinc function data set
%
[X, Y] = sincdata(100);
figure(1)
plot(X, Y, '.');
title('the data')

figure(2)
plotkpca1d(rbfkern(5, X, X), X, 5)
legend('1', '2', '3', '4', '5')
title('first 5 kPCA dimensions')
grid

%
% two blobs data set
%
[X, Y] = twoblobdata(500);
figure(3)
gscatter(X(:, 1), X(:, 2), Y);

figure(4)
w = 10;
plotkpca2d(rbfkern(w, X, X), X, 9)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Your solutions below
%
function [X, Y] = sincdata(N)
% ...

function [X, Y] = twoblobdata(N)
% ...

function K = rbfkern(w, X, Y)
% ...

function plotkpca1d(K, X, D)
% ...

function plotkpca2d(K, X, D)
% ...
