[95fe2b]: wavelets / wfilt_apr.m  Maximize  Restore  History

Download this file

75 lines (71 with data), 2.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
function [h,g,a] = wfilt_apr(N)
%WFILT_APR Almost Perfect Reconstruction Filter Bank for Non-redundant, Approximately Shift-Invariant, ComplexWavelet Transforms
% Usage: [h,g,a] = wfilt_apr(N);
%
% `[h,g,a] = wfilt_apr(N)` computes an almost perfect reconstruction
% filter bank for non-redundant, approximately shift-invariant,
% Complex Wavelet Transforms. Critically subsampled.
%
% References: hosseini2008almost
%
% Examples:
% ---------
%
% Frequency responses of the analysis filters:::
%
% w = fwtinit({'apr',2});
% wtfftfreqz(w.h);
%
a= [3;3;3];
switch(N)
case 1
% from the software package filters1.m
harr = [
-0.0195 (-0.0046 - 0.0018*i) (-0.0046 + 0.0018*i)
-0.0028 (0.0160 - 0.0205*i) (0.0160 + 0.0205*i)
-0.0373 (-0.0050 - 0.0079*i) (-0.0050 + 0.0079*i)
-0.0271 (0.0530 - 0.0753*i) (0.0530 + 0.0753*i)
0.2735 (0.0504 + 0.0402*i) (0.0504 - 0.0402*i)
0.0127 (0.1180 - 0.1403*i) (0.1180 + 0.1403*i)
0.6495 (0.3612 + 0.3391*i) (0.3612 - 0.3391*i)
0.0369 (-0.4554 + 0.4554*i) (-0.4554 - 0.4554*i)
0.6495 (-0.3391 - 0.3612*i) (-0.3391 + 0.3612*i)
0.0127 (0.1403 - 0.1180*i) (0.1403 + 0.1180*i)
0.2735 (-0.0402 - 0.0504*i) (-0.0402 + 0.0504*i)
-0.0271 (0.0753 - 0.0530*i) (0.0753 + 0.0530*i)
-0.0373 (0.0079 + 0.0050*i) (0.0079 - 0.0050*i)
-0.0028 (0.0205 - 0.0160*i) (0.0205 + 0.0160*i)
-0.0195 (0.0018 + 0.0046*i) (0.0018 - 0.0046*i)
];
case 2
harr = [
-0.0124 (-0.0002 + 0.0041*i) (-0.0002 - 0.0041*i)
0.0062 (-0.0095 + 0.0090*i) (-0.0095 - 0.0090*i)
-0.0184 (-0.0014 + 0.0032*i) (-0.0014 - 0.0032*i)
0.0306 (-0.0280 + 0.0134*i) (-0.0280 - 0.0134*i)
0.0611 ( 0.0024 - 0.0351*i) ( 0.0024 + 0.0351*i)
0.0171 (-0.0304 + 0.0042*i) (-0.0304 - 0.0042*i)
0.0883 ( 0.0372 - 0.1169*i) ( 0.0372 + 0.1169*i)
-0.2966 ( 0.0352 + 0.0177*i) ( 0.0352 - 0.0177*i)
-0.0589 ( 0.0938 - 0.1716*i) ( 0.0938 + 0.1716*i)
-0.6231 ( 0.3841 + 0.3107*i) ( 0.3841 - 0.3107*i)
-0.1181 (-0.4446 + 0.4446*i) (-0.4446 - 0.4446*i)
-0.6231 (-0.3107 - 0.3841*i) (-0.3107 + 0.3841*i)
-0.0589 ( 0.1716 - 0.0938*i) ( 0.1716 + 0.0938*i)
-0.2966 (-0.0177 - 0.0352*i) (-0.0177 + 0.0352*i)
0.0883 ( 0.1169 - 0.0372*i) ( 0.1169 + 0.0372*i)
0.0171 (-0.0042 + 0.0304*i) (-0.0042 - 0.0304*i)
0.0611 ( 0.0351 - 0.0024*i) ( 0.0351 + 0.0024*i)
0.0306 (-0.0134 + 0.0280*i) (-0.0134 - 0.0280*i)
-0.0184 (-0.0032 + 0.0014*i) (-0.0032 - 0.0014*i)
0.0062 (-0.0090 + 0.0095*i) (-0.0090 - 0.0095*i)
-0.0124 (-0.0041 + 0.0002*i) (-0.0041 - 0.0002*i)
];
otherwise
error('%s: No such Almost Perfect Reconstruction Filter Bank filter. ',upper(mfilename));
end;
h=mat2cell(harr.',[1,1,1],length(harr));
if(nargout>1)
garr = harr(end:-1:1, :);
g=mat2cell(garr.',[1,1,1],length(harr));
end

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks