-2
$\begingroup$

let us consider following code

clear all;
    clc;
    f1=10;
    f2=40;
    fs=100;
    ts=1/fs;
    t=0:ts:2.93;
    x=19*sin(2*pi*f1*t).*((t<0.25)+(t>1))+20*cos(2*pi*f2*t).*((t>=0.25)+(t<1))+1.5*randn(size(t));
    plot(t,x);
    axis tight
    title('Signal');
    xlabel('Time or Space');

output of plot is given

enter image description here

i would like to apply denosing method using wavelet method,generally i can compute continuous wavelet transform using cwt command,but how exactly procedures can be done for denosing signal and for reconstruction?please help me ,just i need few matlab codes for this.thanks you very much

EDITED :

i have added to my code following command

scales=1:32;
 wname = 'gaus4';
 coefficients=cwt(x,scales,wname,'plot');

and got result

enter image description here

know methods like soft and hard thresholding,there ar esteps

Apply wavelet transform to the noisy signal to produce the noisy wavelet coefficients to the level which we can properly distinguish the PD occurrence. •Select appropriate threshold limit at each level and threshold method (hard or soft thresholding) to best remove the noises. • Inverse wavelet transform of the thresholded wavelet coefficients to obtain a denoised signal.

in my case coefficients are two dimensional matrix,so how can i continue?

i have tried following code

[XD,CXD,LXD] = wden(x,'sqtwolog','s', 'mln',4,'gaus4');

but there is error

************************************************
ERROR ...
------------------------------------------------
 wfilters ---> The wavelet gaus4 is not valid!
************************************************

Error using wfilters (line 92)
Invalid argument value.

Error in wavedec (line 32)
    [Lo_D,Hi_D] = wfilters(IN3,'d');

Error in wden (line 72)
    [c,l] = wavedec(x,n,w);

please help me to finalize my work

$\endgroup$
2
$\begingroup$

The wden function should do exactly what you need: 1-D de-noising. The documentation states that the wavelet family must be orthogonal. The family you specified - Gaussian wavelets - are not orthogonal, thus it is not possible to use it for wavelet denoising.

Use any of the following wavelets:

  • Haar
  • Daubechies
  • Symlets
  • Discrete Meyer

You'll find some information on the different wavelet families in the MATLAB help page on waveletfamilies.

$\endgroup$
  • $\begingroup$ the same wavelet i should use for finding coefficient right? $\endgroup$ – dato datuashvili Feb 18 '15 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.