% eda04_05
% data kernel viewed as a concatenation of columns

N = 32;
Dx=1/(N-1);
x = Dx*[0:N-1]'; % x defined on 0 to 1
xmax=x(N);

M=N-2; % G not square, since I omit the lambda=infinity case here
Mo2=M/2;

% largest wavelenth is 2*xmax
% subsequent wavelengths get smaller
lambda= 2*xmax ./ [1:Mo2]';

G=zeros(N,M);
for i = [1:Mo2]
    ic = 2*i-1;
    is = 2*i;
    G(:,ic) = cos( 2*pi*x/lambda(i) );
    G(:,is) = sin( 2*pi*x/lambda(i) );
end

g1 = G(:,1);
g2 = G(:,2);
g3 = G(:,3);
g4 = G(:,4);
gm = G(:,M);

eda_draw(G,'caption Gm',' ',g1,'caption g1','  ',g2,'caption g2','  ',g3,'caption g3','  ',g4,'caption g4', '...',' ',gm,'caption gM');