Why does deconv not work properly?

2 次查看(过去 30 天)
Sunghan Kim
Sunghan Kim 2013-1-10
Hi,
Can anybody point out the reason that I cannot recover an original signal, s, by applying "deconv.m"? Is it a numerical overflow issue?
%===========================================
% Test code to run
%===========================================
s = [ones(100,1);10*ones(800,1);ones(100,1)];
s = s/sum(s);
r = 0.5;
x = linspace(-r+1e-5,r-1e-5,2^7);
x = x(:);
k = 2/(pi*r^2)*sqrt(r^2-x.^2);
k = k/sum(k);
sconv = conv(s,k);
figure;
subplot(4,1,1);
hold on;
plot(s);
hold off;
box off;
subplot(4,1,2);
hold on;
plot(sconv,'r');
hold off;
box off;
subplot(4,1,3);
plot(deconv(sconv,s),'r');
box off;
subplot(4,1,4);
plot(deconv(sconv,k),'g');
box off;

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by