Prev: Create FM stereo from Matlab.
Next: help! Using discrete convolution to approximate continuous convolution...?
From: Luna Moon on 18 Nov 2009 20:11 Hi all, I am helping a friend on this. We would like to evaluate the convolution of f(x)=exp(3 * x) / (1 + exp(x) ^ 5). However, in Maple and Mathematica, using symbolic calculations, the convolution results in numerical oscillation (lots of spikeness). We don't know why. We just couldn't get rid of the spikeness. And we thought at the end of day, our end-goal is to numerically evaluate some functions involving the convolution of f(x). So it might be better to directly handle the convolution in discrete domain and using Matlab's conv function. So we wrote the following paragraph; but we just couldn't get the scaling and positioning right. For example, let's call the convolution g(x)=f(x) ** f(x), g(0) should correspond to the 20000th element in the resultant z, but z(20000) doesn't give a correct number, compared to the theoretical result of the convolution. Could anybody please help us? We need a way to figure out the scaling factor on the convolution result and how does it map into the continuous convolution result. And hopefully with lots of samples, we would be able to approximate the continuous convolution using discrete convolution. We have to take this approach because the closed-form expression for g(x) gives a lot spikeness and we just couldn't get a stable convolution result via evaluating the closed-form expression at all points. Thanks a lot! ------------------------------------------------------- deltat=0.001; x= [-10:deltat:10-deltat]; y= exp(3 * x) ./ (1 + exp(x) .^ 5); z=conv(y, y)*deltat; figure; plot(z); |