Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wavemngr

Wavelet manager

Syntax

wavemngr('add',FN,FSN,WT,NUMS,FILE)
wavemngr('add',FN,FSN,WT,NUMS,FILE,B)
wavemngr('add',FN,FSN,WT,{NUMS,TYPNUMS},FILE)
wavemngr('add',FN,FSN,WT,{NUMS,TYPNUMS},FILE,B)

Description

wavemngr is a type of wavelets manager. It allows you to add, delete, restore, or read wavelets.

wavemngr('add',FN,FSN,WT,NUMS,FILE) or wavemngr('add',FN,FSN,WT,NUMS,FILE,B) or wavemngr('add',FN,FSN,WT,{NUMS,TYPNUMS},FILE) or wavemngr('add',FN,FSN,WT,{NUMS,TYPNUMS},FILE,B), add a new wavelet family to the toolbox.

FN = Family Name (character vector)

FSN = Family Short Name (character vector of length equal or less than four characters)

WT defines the wavelet type:

  • WT = 1, for orthogonal wavelets

  • WT = 2, for biorthogonal wavelets

  • WT = 3, for wavelet with scaling function

  • WT = 4, for wavelet without scaling function

  • WT = 5, for complex wavelet without scaling function

If the family contains a single wavelet, NUMS = ''. Note that for this case you specify an empty character vector.

Examples:

mexh

''

morl

''


If the wavelet is member of a finite family of wavelets, NUMS is a character vector containing a space-separated list of items representing wavelet parameters.

Example:

biorNUMS = '1.1  1.3  ...  4.4  5.5  6.8'


If the wavelet is part of an infinite family of wavelets, NUMS is a character vector containing a space-separated list of items representing wavelet parameters, terminated by the special sequence **.

Examples:

dbNUMS = '1  2  3  4  5  6  7  8  9  10  **'
shanNUMS = '1-1.5  1-1  1-0.5  1-0.1  2-3  **'


In these last two cases, TYPNUMS specifies the wavelet parameter input format: 'integer' or 'real' or 'charactervector'; the default value is 'integer'.

Examples:

db

TYPNUMS = 'integer'

bior

TYPNUMS = 'real'

shan

TYPNUMS = 'charactervector'


FILE = MAT-file or code file name (character vector). See usage in the “Examples” section.

B = [lb ub] specifies lower and upper bounds of effective support for wavelets of type = 3, 4, or 5.

wavemngr('del',N), deletes a wavelet or a wavelet family. N is the Family Short Name or the Wavelet Name (in the family). N is a character vector.

wavemngr('restore') or wavemngr('restore',IN2) restores previous or initial wavelets. If nargin = 1, the previous wavelets.asc ASCII-file is restored; otherwise the initial wavelets.asc ASCII-file is restored. Here IN2 is a dummy argument.

OUT1 = wavemngr('read') returns all wavelet family names.

OUT1 = wavemngr('read',IN2) returns all wavelet names, IN2 is a dummy argument.

OUT1 = wavemngr('read_asc') reads wavelets.asc ASCII-file and returns all wavelets information.

Examples

collapse all

List the wavelet families available by default.

wavemngr('read')
ans =

  18x35 char array

    '==================================='
    'Haar              		haar           '
    'Daubechies        		db             '
    'Symlets           		sym            '
    'Coiflets          		coif           '
    'BiorSplines       		bior           '
    'ReverseBior       		rbio           '
    'Meyer             		meyr           '
    'DMeyer            		dmey           '
    'Gaussian          		gaus           '
    'Mexican_hat       		mexh           '
    'Morlet            		morl           '
    'Complex Gaussian  		cgau           '
    'Shannon           		shan           '
    'Frequency B-Spline		fbsp           '
    'Complex Morlet    		cmor           '
    'Fejer-Korovkin    		fk             '
    '==================================='

List all wavelets.

wavemngr('read',1)
ans =

  71x44 char array

    '===================================         '
    'Haar              		haar                    '
    '===================================         '
    'Daubechies        		db                      '
    '------------------------------              '
    'db1	db2	db3	db4	                            '
    'db5	db6	db7	db8	                            '
    'db9	db10	db**	                              '
    '===================================         '
    'Symlets           		sym                     '
    '------------------------------              '
    'sym2	sym3	sym4	sym5	                        '
    'sym6	sym7	sym8	sym**	                       '
    '===================================         '
    'Coiflets          		coif                    '
    '------------------------------              '
    'coif1	coif2	coif3	coif4	                    '
    'coif5	                                      '
    '===================================         '
    'BiorSplines       		bior                    '
    '------------------------------              '
    'bior1.1	bior1.3	bior1.5	bior2.2	            '
    'bior2.4	bior2.6	bior2.8	bior3.1	            '
    'bior3.3	bior3.5	bior3.7	bior3.9	            '
    'bior4.4	bior5.5	bior6.8	                    '
    '===================================         '
    'ReverseBior       		rbio                    '
    '------------------------------              '
    'rbio1.1	rbio1.3	rbio1.5	rbio2.2	            '
    'rbio2.4	rbio2.6	rbio2.8	rbio3.1	            '
    'rbio3.3	rbio3.5	rbio3.7	rbio3.9	            '
    'rbio4.4	rbio5.5	rbio6.8	                    '
    '===================================         '
    'Meyer             		meyr                    '
    '===================================         '
    'DMeyer            		dmey                    '
    '===================================         '
    'Gaussian          		gaus                    '
    '------------------------------              '
    'gaus1	gaus2	gaus3	gaus4	                    '
    'gaus5	gaus6	gaus7	gaus8	                    '
    '===================================         '
    'Mexican_hat       		mexh                    '
    '===================================         '
    'Morlet            		morl                    '
    '===================================         '
    'Complex Gaussian  		cgau                    '
    '------------------------------              '
    'cgau1	cgau2	cgau3	cgau4	                    '
    'cgau5	cgau6	cgau7	cgau8	                    '
    '===================================         '
    'Shannon           		shan                    '
    '------------------------------              '
    'shan1-1.5	shan1-1	shan1-0.5	shan1-0.1	      '
    'shan2-3	shan**	                             '
    '===================================         '
    'Frequency B-Spline		fbsp                    '
    '------------------------------              '
    'fbsp1-1-1.5	fbsp1-1-1	fbsp1-1-0.5	fbsp2-1-1	'
    'fbsp2-1-0.5	fbsp2-1-0.1	fbsp**	             '
    '===================================         '
    'Complex Morlet    		cmor                    '
    '------------------------------              '
    'cmor1-1.5	cmor1-1	cmor1-0.5	cmor1-1	        '
    'cmor1-0.5	cmor1-0.1	cmor**	                 '
    '===================================         '
    'Fejer-Korovkin    		fk                      '
    '------------------------------              '
    'fk4	fk6	fk8	fk14	                           '
    'fk18	fk22	                                  '
    '===================================         '

In the following example, new compactly supported orthogonal wavelets are added to the toolbox. These wavelets, which are a slight generalization of the Daubechies wavelets, are based on the use of Bernstein polynomials and are due to Kateb and Lemarié.

Add new family of orthogonal wavelets. You must define:

  • Family Name: Lemarie

  • Family Short Name: lem

  • Type of wavelet: 1 (orth)

  • Wavelets numbers: 1 2 3 4 5

  • File driver: lemwavf

The function lemwavf.m must be as follows:

function w = lemwavf(wname)
where the input argument wname is a character vector of the form sh.name + number (for example, 'lem1' or 'lem2') and w the corresponding scaling filter. The addition is obtained using

wavemngr('add','Lemarie','lem',1,'1 2 3 4 5','lemwavf');

The ASCII file 'wavelets.asc' is saved as 'wavelets.prv', then it is modified and the MAT-file 'wavelets.inf' is generated.

Note that wavemngr works on the current folder. If you add a new wavelet family, it is available in this folder only.

List the available wavelet families.

wavemngr('read')
%  ans =
===================================
Haar                haar           
Daubechies          db             
Symlets             sym            
Coiflets            coif           
BiorSplines         bior           
ReverseBior         rbio           
Meyer               meyr           
DMeyer              dmey           
Gaussian            gaus           
Mexican_hat         mexh           
Morlet              morl           
Complex Gaussian    cgau           
Shannon             shan           
Frequency B-Spline  fbsp           
Complex Morlet      cmor 
Lemarie             lem 
===================================

Remove the added family. Regenerate the list of wavelet families.

wavemngr('del','Lemarie');
wavemngr('read')
ans =
=================================== 
Haar                haar           
Daubechies          db             
Symlets             sym            
Coiflets            coif           
BiorSplines         bior           
ReverseBior         rbio           
Meyer               meyr           
DMeyer              dmey           
Gaussian            gaus           
Mexican_hat         mexh           
Morlet              morl           
Complex Gaussian    cgau           
Shannon             shan           
Frequency B-Spline  fbsp           
Complex Morlet      cmor 
===================================

Restore the previous ASCII file 'wavelets.prv', then build the MAT-file 'wavelets.inf'. List the restored wavelets.

wavemngr('restore');
wavemngr('read',1)
ans =
===================================         
Haar              		  haar                    
===================================         
Daubechies        		  db                      
------------------------------              
db1	  db2	  db3	  db4	                            
db5	  db6	  db7	  db8	                            
db9	  db10	  db**	                              
===================================         
Symlets           		  sym                     
------------------------------              
sym2	  sym3	  sym4	  sym5	                        
sym6	  sym7	  sym8	  sym**	                       
===================================         
Coiflets          		  coif                    
------------------------------              
coif1	  coif2	  coif3	  coif4	                    
coif5	                                      
===================================         
BiorSplines       		  bior                    
------------------------------              
bior1.1	  bior1.3	  bior1.5	  bior2.2	            
bior2.4	  bior2.6	  bior2.8	  bior3.1	            
bior3.3	  bior3.5	  bior3.7	  bior3.9	            
bior4.4	  bior5.5	  bior6.8	                    
===================================         
ReverseBior       		  rbio                    
------------------------------              
rbio1.1	  rbio1.3	  rbio1.5	  rbio2.2	            
rbio2.4	  rbio2.6	  rbio2.8	  rbio3.1	            
rbio3.3	  rbio3.5	  rbio3.7	  rbio3.9	            
rbio4.4	  rbio5.5	  rbio6.8	                    
===================================         
Meyer             		  meyr                    
===================================         
DMeyer            		  dmey                    
===================================         
Gaussian          		  gaus                    
------------------------------              
gaus1	  gaus2	  gaus3	  gaus4	                    
gaus5	  gaus6	  gaus7	  gaus8	                    
gaus**	                                     
===================================         
Mexican_hat       		  mexh                    
===================================         
Morlet            		  morl                    
===================================         
Complex Gaussian  		  cgau                    
------------------------------              
cgau1	  cgau2	  cgau3	  cgau4	                    
cgau5	  cgau**	                               
===================================         
Shannon           		  shan                    
------------------------------              
shan1-1.5	  shan1-1	  shan1-0.5	  shan1-0.1	      
shan2-3	  shan**	                             
===================================         
Frequency B-Spline		  fbsp                    
------------------------------              
fbsp1-1-1.5	  fbsp1-1-1	  fbsp1-1-0.5	  fbsp2-1-1	
fbsp2-1-0.5	  fbsp2-1-0.1	  fbsp**	             
===================================         
Complex Morlet    		  cmor                    
------------------------------              
cmor1-1.5	  cmor1-1	  cmor1-0.5	  cmor1-1	        
cmor1-0.5	  cmor1-0.1	  cmor**	                 
===================================         
Lemarie     lem 
------------------------------ 
lem1    lem2    lem3    lem4    lem5	 
===================================

Restore the initial wavelets. Restore the initial ASCII file 'wavelets.ini' and the initial MAT-file 'wavelets.bin'. Regenerate the list of wavelet families.

wavemngr('restore',0);
wavemngr('read')
ans =
=================================== 
Haar                haar           
Daubechies          db             
Symlets             sym            
Coiflets            coif           
BiorSplines         bior           
ReverseBior         rbio           
Meyer               meyr           
DMeyer              dmey           
Gaussian            gaus           
Mexican_hat         mexh           
Morlet              morl           
Complex Gaussian    cgau           
Shannon             shan           
Frequency B-Spline  fbsp           
Complex Morlet      cmor 
===================================

All command line capabilities are available for new families of wavelets. Create a new family. Compute the four associated filters and the scale and wavelet functions.

wavemngr('add','Lemarie','lem',1,'1 2 3','lemwavf');
[Lo_D,Hi_D,Lo_R,Hi_R] = wfilters('lem3');
[phi,psi,xval] = wavefun('lem3');

Add a new family of orthogonal wavelets in a form specialized for the GUI mode. The file lemwavf allows you to compute the filter for any order. If you want to get a popup of the form '1 2 3 **' associated with the family, then wavelets are appended for GUI mode using:

wavemngr('restore',0); 
wavemngr('add','Lemarie','lem',1,'1 2 3 **','lemwavf');
After this sequence, all GUI capabilities are available for the new wavelets. Note that the last command allows a shortcut in the order definition only if the possible orders are integers.

Limitations

wavemngr allows you to add a new wavelet. You must verify that it is truly a wavelet. No check is performed either about this point or about the type of the new wavelet.

Introduced before R2006a

Was this topic helpful?