addpath('wavelets/');
n = 1500;

W = zeros(n,n);

for j=1:n
    fprintf('processing %d of %d\n', j, n);
    ej = zeros(n,1);
    ej(j) = 1;

    % haar1
    %W(:,j) = haar_1d(ej);
    W(:,j) = wavecdf97 (ej,2);
    
    % haar 2
    %[a,d] = dwt(ej,'haar');
    %w = [a;d];
    %W(:,j) = w(1:n); 

    % db4
%    [c,l] = wavedec(ej,3,'db1');
%    w = ej;
%    w(1:length(c)) = c;
%    W(:,j) = w(1:n); 
end

fprintf('making inverses and transposes:\n');
Wt = W';
Winv = inv(W);
Winvt = Winv';

fprintf('saving\n');
save('data/wavelet_mats.mat','W','Wt','Winv','Winvt');

