symlift.m
上传用户:haiyisale
上传日期:2013-01-09
资源大小:3246k
文件大小:12k
源码类别:

波变换

开发平台:

Matlab

  1. function LS = symlift(wname)
  2. %SYMLIFT Symlets lifting schemes.
  3. %   LS = SYMLIFT(WNAME) returns the lifting scheme specified
  4. %   by WNAME. The valid values for WNAME are:
  5. %      'sym2', 'sym3', 'sym4', 'sym5', 'sym6', 'sym7', 'sym8'
  6. %
  7. %   A lifting scheme LS is a N x 3 cell array such that:
  8. %     for k = 1:N-1
  9. %       | LS{k,1} is the lifting "type" 'p' (primal) or 'd' (dual).
  10. %       | LS{k,2} is the corresponding lifting filter.
  11. %       | LS{k,3} is the higher degree of the Laurent polynomial
  12. %       |         corresponding to the previous filter LS{k,2}.
  13. %     LS{N,1} is the primal normalization.
  14. %     LS{N,2} is the dual normalization.
  15. %     LS{N,3} is not used.
  16. %
  17. %   For more information about lifting schemes type: lsinfo.
  18. %   M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 12-Jun-2003.
  19. %   Last Revision: 30-Jun-2003.
  20. %   Copyright 1995-2004 The MathWorks, Inc.
  21. %   $Revision: 1.1.6.2 $ $Date: 2004/03/15 22:41:50 $ 
  22. Num = wstr2num(wname(4:end));
  23. switch Num
  24.     %== sym2 ============================================================%
  25.     case 2
  26.         LS = {...
  27.                 'd',[-sqrt(3)],0; ...
  28.                 'p',[sqrt(3)-2 sqrt(3)]/4,1; ...
  29.                 'd',[1],-1 ...
  30.             };
  31.         LS(end+1,:) = {(sqrt(3)+1)/sqrt(2),(sqrt(3)-1)/sqrt(2),[]};
  32. % %--------------------  Num LS = 1  ----------------------% 
  33. % LS = {...                                                                 
  34. % 'd'                     [ -1.7320508075722079]                      [0]   
  35. % 'p'                     [ -0.0669872981075236  0.4330127018915160]  [1]   
  36. % 'd'                     [  0.9999999999994959]                      [-1]  
  37. % [  1.9318516525804916]  [  0.5176380902044105]                      []    
  38. % }; 
  39.     case 2.1
  40. %--------------------  Num LS = 2  ----------------------% 
  41. LS = {...                                                                
  42. 'd'                     [ -0.5773502691885155]                      [1]  
  43. 'p'                     [  0.2009618943233436  0.4330127018926641]  [0]  
  44. 'd'                     [ -0.3333333333327671]                      [0]  
  45. [  1.1153550716496254]  [  0.8965754721686846]                      []   
  46. };
  47.     case 2.2        
  48. %--------------------  Num LS = 3  ----------------------% 
  49. LS = {...                                                                
  50. 'd'                     [  0.5773502691900463]                      [0]  
  51. 'p'                     [ -0.4330127018915159  2.7990381056783082]  [0]  
  52. 'd'                     [ -0.3333333333332407]                      [1]  
  53. [  0.2988584907223872]  [  3.3460652149545598]                      []   
  54. };
  55.     case 2.3                
  56. %--------------------  Num LS = 4  ----------------------% 
  57. LS = {...                                                                 
  58. 'd'                     [  1.7320508075676158]                      [1]   
  59. 'p'                     [ -0.4330127018926641 -0.9330127018941287]  [-1]  
  60. 'd'                     [  0.9999999999980750]                      [2]   
  61. [ -0.5176380902041495]  [ -1.9318516525814655]                      []    
  62. };                                                                        
  63.         
  64.     %== sym3 ============================================================%
  65.     case 3
  66. %--------------------  Num LS = 4  ----------------------% 
  67. LS = {...                                                                
  68. 'd'                     [  0.4122865950085308]                      [0]  
  69. 'p'                     [ -0.3523876576801823  1.5651362801993258]  [0]  
  70. 'd'                     [ -0.4921518447467098 -0.0284590895616518]  [1]  
  71. 'p'                     [  0.3896203901445617]                      [0]  
  72. [  0.5213212719156450]  [  1.9182029467652528]                      []   
  73. };                                                                              
  74.     case 3.1
  75. %--------------------  Num LS = 2  ----------------------% 
  76. LS = {...                                                                
  77. 'd'                     [ -0.4122865950517414]                      [1]  
  78. 'p'                     [  0.4667569466389586  0.3523876576432496]  [0]  
  79. 'd'                     [ -0.4921518449249469  0.0954294390155849]  [0]  
  80. 'p'                     [ -0.1161930919191620]                      [1]  
  81. [  0.9546323126334674]  [  1.0475237290484967]                      []   
  82. }; 
  83.     case 3.2
  84. %--------------------  Num LS = 5  ----------------------% 
  85. LS = {...                                                                 
  86. 'd'                     [ -0.4122865950517414]                      [1]   
  87. 'p'                     [ -1.5651362796324981  0.3523876576432496]  [0]   
  88. 'd'                     [ -2.5381416988469603  0.4921518449249469]  [1]   
  89. 'p'                     [  0.3896203899372190]                      [-1]  
  90. [  4.9232611941772104]  [  0.2031173973021602]                      []    
  91. };
  92.     case 3.3
  93. %--------------------  Num LS = 6  ----------------------% 
  94. LS = {...                                                                 
  95. 'd'                     [  2.4254972441665452]                      [1]   
  96. 'p'                     [ -0.3523876576432495 -0.2660422349436360]  [-1]  
  97. 'd'                     [  2.8953474539232271  0.1674258735039567]  [2]   
  98. 'p'                     [ -0.0662277660392190]                      [-1]  
  99. [ -1.2644633083567955]  [ -0.7908493614571760]                      []    
  100. };                                                                        
  101.         
  102.     %== sym4 ============================================================%
  103.     case 4
  104. %--------------------  Num LS = 16  ----------------------% 
  105. LS = {...                                                                
  106. 'd'                     [  0.3911469419700402]                      [0]  
  107. 'p'                     [ -0.1243902829333865 -0.3392439918649451]  [1]  
  108. 'd'                     [ -1.4195148522334731  0.1620314520393038]  [0]  
  109. 'p'                     [  0.4312834159749964  0.1459830772565225]  [0]  
  110. 'd'                     [ -1.0492551980492930]                      [1]  
  111. [  1.5707000714496564]  [  0.6366587855802818]                      []   
  112. };                                                                       
  113.     case 4.1
  114. %--------------------  Num LS = 19  ----------------------% 
  115. LS = {...                                                                 
  116. 'd'                     [ -0.3911469419692201]                      [1]   
  117. 'p'                     [  0.3392439918656564  0.1243902829339031]  [-1]  
  118. 'd'                     [ -0.1620314520386309 -0.8991460629746448]  [2]   
  119. 'p'                     [  0.4312834159764773 -0.2304688357916146]  [-1]  
  120. 'd'                     [  0.6646169843776997]                      [2]   
  121. [  1.2500817546829417]  [  0.7999476804248136]                      []    
  122. };
  123.  
  124.     %== sym5 ============================================================%
  125.     case 5
  126. %--------------------  Num LS = 29  ----------------------% 
  127. LS = {...                                                                
  128. 'd'                     [ -0.9259329171294208]                      [0]  
  129. 'p'                     [  0.4985231842281166  0.1319230270282341]  [0]  
  130. 'd'                     [ -0.4293261204657586 -1.4521189244206130]  [1]  
  131. 'p'                     [ -0.0948300395515551  0.2804023843755281]  [1]  
  132. 'd'                     [  1.9589167118877153  0.7680659387165244]  [0]  
  133. 'p'                     [ -0.1726400850543451]                      [0]  
  134. [  2.0348614718930915]  [  0.4914339446751972]                      []   
  135. };
  136.     case 5.1
  137. %--------------------  Num LS = 23  ----------------------% 
  138. LS = {...                                                                
  139. 'd'                     [  1.0799918455239754]                      [0]  
  140. 'p'                     [  0.1131044403334987 -0.4985231842281165]  [1]  
  141. 'd'                     [  2.4659476305614541 -0.5007584249312305]  [0]  
  142. 'p'                     [ -0.0558424247659369 -0.2404034797205558]  [1]  
  143. 'd'                     [  3.3265774193213002  1.3043080355478955]  [0]  
  144. 'p'                     [ -0.1016623108755641]                      [0]  
  145. [ -2.6517078902691829]  [ -0.3771154446044534]                      []   
  146. };
  147.     case 5.2
  148. %--------------------  Num LS = 24  ----------------------% 
  149. LS = {...                                                                
  150. 'd'                     [  1.0799918455239754]                      [0]  
  151. 'p'                     [  0.1131044403334987 -0.4985231842281165]  [1]  
  152. 'd'                     [ -1.6937259364035369 -0.5007584249312305]  [0]  
  153. 'p'                     [  0.2404034797205558 -0.0813027019760201]  [0]  
  154. 'd'                     [  0.8958585825127051 -4.4713044896913088]  [1]  
  155. 'p'                     [  0.1480132819787044]                      [0]  
  156. [  3.0742840094152357]  [  0.3252789907950670]                      []   
  157. };
  158.         
  159.     case 6
  160. %--------------------  Num LS = 1  ----------------------% 
  161. % Pow MAX = 0 - diff POW = 0
  162. %---+----+----+----+----+---%
  163. LS = {...                                                                 
  164. 'd'                     [  0.2266091476053614]                      [0]   
  165. 'p'                     [  1.2670686037583443 -0.2155407618197651]  [1]   
  166. 'd'                     [ -0.5047757263881194  4.2551584226048398]  [-1]  
  167. 'p'                     [ -0.0447459687134724 -0.2331599353469357]  [3]   
  168. 'd'                     [ 18.3890008539693710 -6.6244572505007815]  [-3]  
  169. 'p'                     [ -0.1443950619899142  0.0567684937266291]  [5]   
  170. 'd'                     [  5.5119344180654508]                      [-5]  
  171. [ -1.6707087396895259]  [ -0.5985483742581210]                      []    
  172. };                                                                        
  173.     case 7
  174. %--------------------  Num LS = 1  ----------------------% 
  175. % Pow MAX = 0 - diff POW = 0
  176. %---+----+----+----+----+---%
  177. LS = {...                                                                 
  178. 'p'                     [  0.3905508237124110]                      [0]   
  179. 'd'                     [ -0.3388639272262041  7.1808202373094066]  [0]   
  180. 'p'                     [ -0.0139114610261505 -0.1372559452118446]  [2]   
  181. 'd'                     [ 29.6887047769035310  0.1338899561610895]  [-2]  
  182. 'p'                     [  0.1284625939282921 -0.0001068796412094]  [4]   
  183. 'd'                     [ -7.4252008608107740 -2.3108058612546007]  [-4]  
  184. 'p'                     [  0.0532700919298021  0.2886088139333021]  [6]   
  185. 'd'                     [ -1.1987518309831993]                      [-6]  
  186. [  2.1423821239872392]  [  0.4667701381576485]                      []    
  187. };                                                                        
  188.     case 8
  189. %--------------------  Num LS = 1  ----------------------% 
  190. % Pow MAX = 0 - diff POW = 0
  191. %---+----+----+----+----+---%
  192. LS = {...                                                                 
  193. 'd'                     [  0.1602796165947262]                      [0]   
  194. 'p'                     [  0.7102593464144563 -0.1562652322408773]  [1]   
  195. 'd'                     [ -0.4881496179387070  1.8078532235524318]  [-1]  
  196. 'p'                     [  1.7399180943774144 -0.4863315213006700]  [3]   
  197. 'd'                     [ -0.5686365236759819 -0.2565755576271975]  [-3]  
  198. 'p'                     [ -0.8355308510520870  3.7023086183759020]  [5]   
  199. 'd'                     [  0.5881022226370752 -0.3717452749902822]  [-5]  
  200. 'p'                     [ -2.1580699620177337  0.7491890598341392]  [7]   
  201. 'd'                     [  0.3531271830147090]                      [-7]  
  202. [  0.4441986800900797]  [  2.2512448704197152]                      []    
  203. };                                                                        
  204.         
  205.     otherwise
  206.         error('Invalid wavelet number.')
  207.         
  208. end