From: SmartEngineer on
Iam trying to generate a sinusoidal and a guassian noise.Convolve them and deconvolve them to get the sinusoidal signal back.I have tried with the following code:

x= -pi:0.01:pi % Generate Sinusoidal signal
s=sin(x);
plot(x,sin(x)), grid on
n=randn(1,629); % Generate Guassion Noise
z=conv(s,n); % Convolve Signal and Noise
plot(z);
[dz,r]=deconv(z,s);% Deconvolve
plot(dz);

But Im not able to get the Sine signal back.Am i missing something here.Please suggest.

Thank you.
From: Bruno Luong on
"SmartEngineer " <smartengineer(a)mathworks.com> wrote in message <hsdp0a$d10$1(a)fred.mathworks.com>...
> Iam trying to generate a sinusoidal and a guassian noise.Convolve them and deconvolve them to get the sinusoidal signal back.I have tried with the following code:
>
> x= -pi:0.01:pi % Generate Sinusoidal signal
> s=sin(x);
> plot(x,sin(x)), grid on
> n=randn(1,629); % Generate Guassion Noise
> z=conv(s,n); % Convolve Signal and Noise
> plot(z);
> [dz,r]=deconv(z,s);% Deconvolve
> plot(dz);

Deconvolution is extremely ill-posed problem, any numerical errors are amplified hugely, especially when you have smooth kernel like SIN and furthermore applied on noise.

Use it for polynomial division with half dozen coefficients is probably OK, but I wouldn't expect any more than that.

Sorry to say it, but this is a typical example of GIGO algorithm.

Bruno