Why does deconv not work properly?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!