function WavMtx = WaveMtx(N, D, wavelet)
%WAVEMTX Compute wavelet transform matrix.
%   M = WAVEMTX(N, D, wavelet) returns the N-by-M wavelet transform matrix.
%   
%   Example
%   -------
%       M = WaveMtx(32, 3, 'sym4');
%       output = M * input;
    for i = 1 : N
        ulaz = zeros(1, N);
        ulaz(i) = 1;

        izlaz = wavedec(ulaz, D, wavelet);
    
        WavMtx(1 : length(izlaz), i) = izlaz;
    end
return
