Frequency band for DWT

by

 

with this code you can find approximation frequency band cA and detail frequency bands cD of a DW.

[cA cDlv] =frequenzbereich(fs,lv)
function  [cA cDlv] =frequenzbereich(fs,lv)
%---------------------------------------------------------------------
% with this code you can find  approximation frequency band cA and detail
% frequency bands cD of a DWT. Here :
                    % "fs" is the sample frequency
                    % "lv" is level of decomposition
            % Output are :
                    % "cA" is approximation frequency band 
                    % "cDlv" is matrix of "lv" detail frequency bands.
% @Hannover 26-Dec-2012, lekhanh85@gmail.com
%----------------------------------------------------------------------

cDlv =[];
cA = [0 (fs./(2^(lv+1)))];
for i = 1:lv
   temp = [(fs./(2^(i+1))),(fs./(2^(i))) ];
cDlv = [cDlv ;temp];
end

Contact us