%% DST transform
% Tom Wada
% 2011/6/20

N=8;
n=(0:N-1);
%Šî’êŠÖ�”
q=zeros(N,N);
q(1,:)=1*sin(pi/(2*N)*(2*n+1)*0);
for l=2:N
    q(l,:)=sqrt(2)*sin(pi/(2*N)*(2*n+1)*(l-1));
end
%’¼Œðƒ`ƒFƒbƒN
InnerProd=zeros(N,N);
for l=1:N
    for n=1:N
        InnerProd(l,n)=q(l,:)*q(n,:)'/N;
    end
end
figure(1)
for l=1:N
    subplot(8,1,l)
    stem(q(l,:));
    axis([1,8,-2,2]);
end

