Of course convolution as an integral also has a similar property. The idea is that conv will preserve the scaling of your signal as long as the kernel is scaled to sum to 1, AND there are no losses due to truncation of the edges. signal = conv(rt/sum(rt),measured,'same') This introduces an edge effect, since it truncates some of the signal so it ends up losing just a bit. Now, as it turns out, you are using the same option for conv. See that this next version does preserve the scaling of your vector: signal = conv(rt/sum(rt),measured) So, note how the scalings pass through here. Were rt scaled to sum to 1, then conv would preserve the scaling of your original vector. In fact, you can expand it as a sum, using a couple of explicit loops, sums of products of the measured and rt vectors. I think you misunderstand what conv (and probably also therefore deconv) is doing.Ī discrete convolution is simply a sum. It then computes the convolution of the two functions using the conv function in MATLAB and plots the result. (The use of deconv only gives me 1 point, so I used convolve instead). For the first pair of functions, the code defines two rectangular pulses (rect) with different time shifts and amplitudes. My thoughts are that the slit height is not exactly 1 or that convolve will not actually effectively deconvolve, as I request it to. If you use what I have exactly, you will see that the check and measured are off by that factor of 11000~ish that I threw up there.ĭoes anyone have any suggestions. And check is to verify that if I convolve my slit with the signal I found, I get the same result. measured represents the signal I was given. Polynomial Multiplication via Convolution Vector Convolution Central Part of Convolution Input Arguments. It works very well, within my error limit.as long as I divide my final result by a very large factor (11000). MATLAB Mathematics Elementary Math Polynomials MATLAB Mathematics Fourier Analysis and Filtering conv On this page Syntax Description Examples. I have the following code which is used to deconvolve a signal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |