[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Matlab Convolution and Deconvolution Error
From: |
Søren Hauberg |
Subject: |
Re: Matlab Convolution and Deconvolution Error |
Date: |
Wed, 15 Oct 2008 09:22:38 +0200 |
tir, 14 10 2008 kl. 23:02 -0700, skrev olbert:
> I am using Matlab to perform convolution and deconvolution to discrete time
> signals. There seems to be an error when one of the signals is long(ie
> there are many numbers in the array) and the first number in the other's
> array is near to zero.
>
> This is a simple example of my problem(the actual numbers I am using are
> more complicated)-
> A = 0:100;
> B = [0.01 1];
> C = conv(A,B);
> D = deconv(C,B);
> subplot(2,1,1)
> plot(A)
> subplot(2,1,2)
> plot(D)
>
> The two plots should be the same but they arent. If you change A to a
> smaller signal, ie maybe only 10 numbers long, then it works and if you
> change the first number of B to something larger ie 1 then it also works.
> How can I fix this problem, as I have been given set formulas to work with.
> The numbers I am trying to convolve and deconvolve are both long and begin
> with very small numbers.
>
> Also could it just be a problem with my matlab version?
Hmm, when I run your example in Octave 3.0.2 and Matlab 7.6 I get the
same result. That is, D is essentially zero everywhere.
Søren