i am trying to build my new wavelet. i used wavemngr but an error occured while doing decomposition using the new wavelet. kindly help me out..this is the code i used
    2 views (last 30 days)
  
       Show older comments
    
image2=('C:\Users\hp\Desktop\data\1 (1).JPG');
[h l]= newwavelet(image2)
WAVEMNGR('add','shivjoshi','josh',1,'','newwavelet')
 OUT1 = WAVEMNGR('read')
 [C,S] = wavedec2(image2,2,'josh');
here in 2nd line h and l have high and low pass coefficients the code is working upto 4th line when i use OUT1 = WAVEMNGR('read') my new added wavelet is showing but in the 5th line error occured that file 'josh' doesnt exist
0 Comments
Accepted Answer
  Wayne King
    
      
 on 30 May 2013
        You should have an M-file that just defines the scaling filter for an orthogonal wavelet
So for example:
function h = newwavelet(wname)
   h = [-0.0106
    0.0329
    0.0308
   -0.1870
   -0.0280
    0.6309
    0.7148
    0.2304];
end
Then, first delete what you have already done.
wavemngr('del','josh');
Then, re-add
wavemngr('add','shivjoshi','josh',1,'','newwavelet.m')
Next, check that the wavelet is there
    wavemngr('read')
Finally, create some data to test
    Im = randn(10,10);
    [C,S] = wavedec2(Im,1,'josh');
5 Comments
  Wayne King
    
      
 on 30 May 2013
				
      Edited: Wayne King
    
      
 on 30 May 2013
  
			why are you inputting image2 into newwavelet? You do NOT input the image data into newwavelet.m. newwavelet.m should take only one input argument and that input argument should be wname. Just like I have done above in my example. MATLAB will call newwavelet.m with
newwavelet('josh')
and that should return a 1-D vector that is the scaling filter.
So if your newwavelet.m function does not work with:
h = newwavelet('josh');
then you are doing it wrong.
More Answers (0)
See Also
Categories
				Find more on Continuous Wavelet Transforms in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
