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!