2
$\begingroup$

I am doing mtech project now. Actually I am working on discrete wavelet transform.I have done till wavelet decomposition. I have been stuck in reconstructing the signal back to original .please help me out.

code--

f=10;
fs=200;
amp_x = 14;
% amplitude for sinusodial 2
amp_y = 9;
% Time vector 
t=(0:1:5000);
% Create a sine wave 
x = amp_x * (sin(2*pi*f/fs*t));
%filter coefficients
LO_D =[ 0.7071    0.7071];
HI_D =[-0.7071    0.7071];

C = conv(LO_D,x);
k = 2;
CA= C(2:k:length(C));

D = conv(HI_D,x);
g=2;
CD= D(2:g:length(D));

CA and CD are my approximation and detailed coefficients. now i do squaring for CD coefficients so as to remove artefacts.

for i=1:length(CD)
    cd1(i)=CD(i).^2;
end

after squaring I put a threshold and remove the values greater than the threshold. So i get a denoised signal.

Now i need to reconstruct the denoised signal to original.how do i do it without using inbuilt commands. please answer me.

$\endgroup$
  • $\begingroup$ Why are you squaring the data? $\endgroup$ – Laurent Duval Mar 29 '18 at 18:07
  • $\begingroup$ I need to remove the artefacts. when squaring is done i can get to know where the threshold can be put so as to remove artefacts. $\endgroup$ – Vinutha Mar 30 '18 at 5:28

Your Answer

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

Browse other questions tagged or ask your own question.