0001
0002
0003 function Psi = create_DWT(in)
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 N = in.N;
0014 wType = in.wType;
0015 J = in.J;
0016 sym = in.sym;
0017
0018 if strcmpi(wType(1:4),'daub')
0019 switch wType
0020 case 'daub79'
0021 [h0 h1 g0 g1] = daub79; sym = 1;
0022 case 'daub1018'
0023 [h0 h1 g0 g1] = daub1018; sym = 2;
0024
0025
0026
0027
0028
0029
0030 otherwise
0031 filter_length = str2num(wType(5:end));
0032 [h0 h1 g0 g1] = dauborth(filter_length);
0033 end
0034 else
0035 error('Not implemented yet');
0036 end
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 if sym == 3
0057 w_len = filter_length;
0058
0059 for j = 1:J-1; w_len(end+1) = 2*w_len(end)-1+(filter_length-1); end
0060 w_len(end+1) = w_len(end);
0061 else
0062 w_len = N;
0063 end
0064
0065 if w_len(end) > N && sym == 3;
0066 error('reduce the scale J or increase length N - length of scaling function is larger than N');
0067 end
0068
0069
0070 switch sym
0071 case 3
0072 iW_h = @(x) idwtmult1_conv(x,g0,g1,J);
0073
0074 otherwise
0075 iW_h = @(x) ifwt(x,g0,g1,J,sym);
0076 end
0077 Psi = [];
0078 for ii = 1:N;
0079 Psi(:,end+1) = iW_h(circshift([1; zeros(N-1,1)],ii-1));
0080 end
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090