How to calculate the correct deconvoluition?

3 views (last 30 days)
A.O.
A.O. on 22 Aug 2022
We have 'step type' model data 'M'.
We calculated the convolution of the model data ('C') using the transfer function h(t).
Why can't get correct solution when we deconvolute the convoluted data ('C')?
r equals to C using this code.
If calculated correctly, r equals to M.
Please tell me the correct way to use the function 'deconv'.
close all
%% Step1 Definition of transfer function h(t)
% Time range
n1 = 100;
t = [1:100]';
% Input A and B
A = 5.12
B = 24.8
h = sqrt(A/(pi*(B^2)))*exp(-1/(4*A))*exp(-1*A*((log(t/B).^2)))
%% Step2 Model data 'M'(Solution of deconvolution)
% Model data
M = zeros(1,n1);
M = M';
M(1) = 0;
M(2) = 1;
M(3) = 2;
M(4) = 3;
M(5) = 4;
M(6) = 5;
M(7) = 4;
M(8) = 3;
M(9) = 2;
M(10) = 1;
M(11) = 0;
%% Step3 Model data 'C'(Convolution of 'M')
% Convoluted data
C = conv(M, h, "full");
C = C(1:n1);
%% Step4 Calcurate deconvolution (Deconvolution of 'C')
% Calcurate deconvolution of 'C'
[q,r] = deconv(C,h);
plot(r)

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!