dblift.m
上传用户:haiyisale
上传日期:2013-01-09
资源大小:3246k
文件大小:14k
- function LS = dblift(wname)
- %DBLIFT Daubechies lifting schemes.
- % LS = DBLIFT(WNAME) returns the lifting scheme specified by WNAME.
- %
- % A lifting scheme LS is a N x 3 cell array such that:
- % for k = 1:N-1
- % | LS{k,1} is the lifting "type" 'p' (primal) or 'd' (dual).
- % | LS{k,2} is the corresponding lifting filter.
- % | LS{k,3} is the higher degree of the Laurent polynomial
- % | corresponding to the previous filter LS{k,2}.
- % LS{N,1} is the primal normalization.
- % LS{N,2} is the dual normalization.
- % LS{N,3} is not used.
- %
- % For more information about lifting schemes type: lsinfo.
- %
- % The valid values for WNAME are:
- % 'haar', 'db1', 'db2', 'db3', 'db4', 'db5', 'db6', 'db7', 'db8'
- % M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 09-Feb-2000.
- % Last Revision: 30-Jun-2003.
- % Copyright 1995-2004 The MathWorks, Inc.
- % $Revision: 1.1.6.2 $ $Date: 2004/03/15 22:40:03 $
- wname = lower(wname);
- if isequal(wname,'haar')
- Num = 1;
- elseif isequal(wname,'db1int')
- Num = 1.2;
- else
- Num = wstr2num(wname(3:end));
- end
- switch Num
- %== db1 ============================================================%
- case 1
- LS = {...
- 'd',[-1],0; ...
- 'p',[1/2],0 ...
- };
- LS(end+1,:) = {sqrt(2),sqrt(2)/2,[]};
-
- case 1.1
- LS = {...
- 'd',[-1],1; ...
- 'p',[1/2],-1 ...
- };
- LS(end+1,:) = {sqrt(2),sqrt(2)/2,[]};
- case 1.2
- LS = {...
- 'd',[-1],0; ...
- 'p',[1/2],0 ...
- };
- LS(end+1,:) = {1,1/2,['I']};
- %== db2 ============================================================%
- case 2
- LS = {...
- 'd',[-sqrt(3)],0; ...
- 'p',[sqrt(3)-2 sqrt(3)]/4,1; ...
- 'd',[1],-1 ...
- };
- LS(end+1,:) = {(sqrt(3)+1)/sqrt(2),(sqrt(3)-1)/sqrt(2),[]};
- % %-------------------- Num LS = 1 ----------------------%
- % LSB = {...
- % 'd' [ -1.7320508075722079] [0]
- % 'p' [ -0.0669872981075236 0.4330127018915160] [1]
- % 'd' [ 0.9999999999994959] [-1]
- % [ 1.9318516525804916] [ 0.5176380902044105] []
- % };
- case 2.1
- %-------------------- Num LS = 2 ----------------------%
- LS = {...
- 'd' [ -0.5773502691885155] [1]
- 'p' [ 0.2009618943233436 0.4330127018926641] [0]
- 'd' [ -0.3333333333327671] [0]
- [ 1.1153550716496254] [ 0.8965754721686846] []
- };
- case 2.2
- %-------------------- Num LS = 3 ----------------------%
- LS = {...
- 'd' [ 0.5773502691900463] [0]
- 'p' [ -0.4330127018915159 2.7990381056783082] [0]
- 'd' [ -0.3333333333332407] [1]
- [ 0.2988584907223872] [ 3.3460652149545598] []
- };
- case 2.3
- %-------------------- Num LS = 4 ----------------------%
- LS = {...
- 'd' [ 1.7320508075676158] [1]
- 'p' [ -0.4330127018926641 -0.9330127018941287] [-1]
- 'd' [ 0.9999999999980750] [2]
- [ -0.5176380902041495] [ -1.9318516525814655] []
- };
-
- %== db3 ============================================================%
- case 3
- %-------------------- Num LS = 7 ----------------------%
- % Pow MAX = 0 - diff POW = 0
- %---+----+----+----+----+---%
- LS = {...
- 'd' [ -2.4254972439123361] [0]
- 'p' [ -0.0793394561587384 0.3523876576801823] [1]
- 'd' [ 2.8953474543648969 -0.5614149091879961] [-1]
- 'p' [ 0.0197505292372931] [2]
- [ 2.3154580432421348] [ 0.4318799914853075] []
- };
- case 3.01
- %-------------------- Num LS = 4 ----------------------%
- LS = {...
- 'd' [ 0.4122865950085308] [0]
- 'p' [ -0.3523876576801823 1.5651362801993258] [0]
- 'd' [ -0.4921518447467098 -0.0284590895616518] [1]
- 'p' [ 0.3896203901445617] [0]
- [ 0.5213212719156450] [ 1.9182029467652528] []
- };
- case 3.1
- %-------------------- Num LS = 2 ----------------------%
- LS = {...
- 'd' [ -0.4122865950517414] [1]
- 'p' [ 0.4667569466389586 0.3523876576432496] [0]
- 'd' [ -0.4921518449249469 0.0954294390155849] [0]
- 'p' [ -0.1161930919191620] [1]
- [ 0.9546323126334674] [ 1.0475237290484967] []
- };
- case 3.2
- %-------------------- Num LS = 5 ----------------------%
- LS = {...
- 'd' [ -0.4122865950517414] [1]
- 'p' [ -1.5651362796324981 0.3523876576432496] [0]
- 'd' [ -2.5381416988469603 0.4921518449249469] [1]
- 'p' [ 0.3896203899372190] [-1]
- [ 4.9232611941772104] [ 0.2031173973021602] []
- };
- case 3.3
- %-------------------- Num LS = 6 ----------------------%
- LS = {...
- 'd' [ 2.4254972441665452] [1]
- 'p' [ -0.3523876576432495 -0.2660422349436360] [-1]
- 'd' [ 2.8953474539232271 0.1674258735039567] [2]
- 'p' [ -0.0662277660392190] [-1]
- [ -1.2644633083567955] [ -0.7908493614571760] []
- };
-
- %== db4 ============================================================%
- case 4
- %-------------------- Num LS = 4 ----------------------%
- LS = {...
- 'd' [ -0.3222758879971411] [1]
- 'p' [ -1.1171236051605939 -0.3001422587485443] [0]
- 'd' [ -0.0188083527262439 0.1176480867984784] [2]
- 'p' [ 2.1318167127552199 0.6364282711906594] [0]
- 'd' [ -0.4690834789110281 0.1400392377326117 -0.0247912381571950] [0]
- [ 0.7341245276832514] [ 1.3621667200737697] []
- };
- case 4.1
- %-------------------- Num LS = 3 ----------------------%
- LS = {...
- 'd' [ -0.3222758879971411] [1]
- 'p' [ 0.7346312579222475 0.2919531260038340] [0]
- 'd' [ -0.5400282834063568 0.1726731008597592] [0]
- 'p' [ 0.0647242393202307 -0.3648383438736335] [2]
- 'd' [ -0.0326236494591675] [-2]
- [ 0.8421450430836753] [ 1.1874439067388065] []
- };
- case 4.2
- %-------------------- Num LS = 5 ----------------------%
- LS = {...
- 'd' [ 0.3222758880003921] [0]
- 'p' [ -0.2919531260008889 1.1171236051160263] [0]
- 'd' [ -0.5400282834279011 -0.1135514966410223] [1]
- 'p' [ -0.0984234944920643 0.5547946967916940] [1]
- 'd' [ 0.0214536265550236] [-1]
- [ 0.6829218120474427] [ 1.4642964719517990] []
- };
- %== db5 ============================================================%
- case 5
- %-------------------- Num LS = 3 ----------------------%
- LS = {...
- 'd' [ -0.2651451428113514] [1]
- 'p' [ 0.9940591341382633 0.2477292913288009] [0]
- 'd' [ -0.5341246460905558 0.2132742982207803] [0]
- 'p' [ 0.2247352231444452 -0.7168557197126235] [2]
- 'd' [ -0.0775533344610336 0.0121321866213973] [-2]
- 'p' [ -0.0357649246294110] [3]
- [ 0.7632513182465389] [ 1.3101844387211246] []
- };
- case 5.1
- %-------------------- Num LS = 8 ----------------------%
- LS = {...
- 'd' [ 0.2651451427754539] [0]
- 'p' [ -0.2477292913623405 0.8781630286393748] [0]
- 'd' [ -0.5341246459806663 -0.2414213048251172] [1]
- 'p' [ -0.1985336258386243 0.6332784120192370] [1]
- 'd' [ 0.0877884834474499 -0.0137333394082371] [-1]
- 'p' [ 0.0315951369981596] [2]
- [ 0.8120562227775144] [ 1.2314418287192634] []
- };
- case 6
- %-------------------- Num LS = 1 ----------------------%
- % Pow MAX = 0 - diff POW = 0
- %---+----+----+----+----+---%
- LS = {...
- 'd' [ -4.4344683000391223] [0]
- 'p' [ -0.0633131925095066 0.2145934499409130] [1]
- 'd' [ 9.9700156175718320 -4.4931131753641633] [-1]
- 'p' [ -0.0236634936395882 0.0574139367993266] [3]
- 'd' [ 2.3564970162896977 -0.6787843541162683] [-3]
- 'p' [ -0.0009911655293238 0.0071835631074942] [5]
- 'd' [ 0.0941066741175849] [-5]
- [ 3.1214647228121661] [ 0.3203624223883869] []
- };
-
- case 7
- %-------------------- Num LS = 1 ----------------------%
- % Pow MAX = 0 - diff POW = 0
- %---+----+----+----+----+---%
- LS = {...
- 'p' [ 5.0934984843051252] [0]
- 'd' [ -0.1890420920712265 0.0573987259882762] [0]
- 'p' [ 5.9592087615113751-12.2854449956285200] [2]
- 'd' [ -0.0604278631256078 0.0291354832685777] [-2]
- 'p' [ 1.5604402591648248 -3.9707106658519669] [4]
- 'd' [ -0.0126913773028362 0.0033065734202625] [-4]
- 'p' [ 0.0508158836098717 -0.4141984501693177] [6]
- 'd' [ -0.0004062144890730] [-6]
- [ 0.2990107076865977] [ 3.3443618381992222] []
- };
-
- case 8
- %-------------------- Num LS = 2 ----------------------%
- % Pow MAX = 0 - diff POW = 0
- %---+----+----+----+----+---%
- LS = {...
- 'd' [ -5.7496416141714990] [0]
- 'p' [ -0.0522692017330962 0.1688172436569421] [1]
- 'd' [ 14.5428210043618850 -7.4021068366100549] [-1]
- 'p' [ -0.0324020739512596 0.0609092564633227] [3]
- 'd' [ 5.8187164907231610 -2.7556987881059287] [-3]
- 'p' [ 0.9452952681157910 0.2420216844324576] [5]
- 'd' [ 0.0001888402536823 -0.0018038158742157] [-3]
- 'p' [ -0.9526138318957663 -0.2241381624167550] [5]
- 'd' [ 1.0497432943790195 -0.2469917331775993 0.0271973973533717] [-5]
- [ 3.5493622541356347] [ 0.2817407546481972] []
- };
-
- otherwise
- error('Invalid wavelet number.')
-
- end