Right I must first say, this is not homework, if it was, I might have a clue what I am doing.

I am currently doing some research and as part of the understanding of the data we have produced I am trying to convolute it.

For this I want a C++ programme that can

firstly convolute a gaussian with one of my data points,

secondly convolute a gaussian with two of my data points,

then convolute a gaussian with all of my data points.

As a complete novice I realise this may well take some time, but any hints in the right direction would be great, the entire code would be even better, but there would have to be an idiots guide with it as I want to understand how it works too.

Thanks

i don't know what "convolute a gaussian" actually is... probably because I skiped my math class :) ... but, in cases like this you should do a study over the algorithm ivolved ( you could even post some links here so we can see it too ) and then try to find an open-source library that already implements your desired function ( you will shurely find it !!! ), and carefully check their implementation. If you agree with it .. there you go, if not go ahead and implement it yourself, but at least, now you have a starting point...

i don't know what "convolute a gaussian" actually is... probably because I skiped my math class :) ... but, in cases like this you should do a study over the algorithm ivolved ( you could even post some links here so we can see it too ) and then try to find an open-source library that already implements your desired function ( you will shurely find it !!! ), and carefully check their implementation. If you agree with it .. there you go, if not go ahead and implement it yourself, but at least, now you have a starting point...

A Guassian is just a function

So basically what i want to do is convolute a value with a function.

Where do i look for an open source library, when I have searched I have found lots of convolution stuff for images and dont have the foggiest where to start in adapting it.

Cheers

"convolute a gaussian". I looked up the word convolute in wiki, and for computer science you need a Ph.D. in math in order to understand it. Well, I barly passed 1st grade math :)

"convolute a gaussian". I looked up the word convolute in wiki, and for computer science you need a Ph.D. in math in order to understand it. Well, I barly passed 1st grade math :)

well im doing a phd in physics and i am a chemist so im in as good a position to understand it as you...

convolute a gaussian

Just found this as for some stupid reason I had never searched the above words

http://root.cern.ch/root/html/examples/langaus.C.html

at first look..... im lost

will have a read through.....

well, that looks like an implementation... you should know if it's what u need....
if you want to test it I think you could do that with MathLab. I bet matlab has this function implemented.

well im doing a phd in physics and i am a chemist so im in as good a position to understand it as you...

Not true -- you are in a much better position to understand it because you probably have the math background. And I wish you well on getting your phd.

Perhaps you should give some background on why you need gaussian convolution. I mean: if you don't understand what is does, why do you think you need it?

So basically what i want to do is convolute a value with a function.

Convolution is nothing but a multiplication between functions right? So if you want to convolute a function with a value, wouldn't it be as simple as : val * (F) ? Or am I being optimistic here? As AD said: this is a better question for someone who really knows his/her math (which isn't me) And I agree with Kux that Matlab probably has a build in function for these kind of things. So perhaps your question has a better change of getting solved in the Computer Science forum.

As far as I remember multiplication in the frequency domain is more efficient than convolution in the time domain, so fft the signals and multiply 'em out. Also, if you're doing a PhD in physics I'd assume that you'd have access to mathematically orientated software. This is much more easily accomplished via something like Matlab.

Search the web for gsl gaussian distribution.There is a function that does what you want,,,maybe if you look for the source code will help.Then all you have to do is find the inf integral of 2 gaussian distr. for every disctere time period and store them in a array of data.You can choose the discrete time samples to be as much as twice the frequency in order to not lose information

If your convolution kernel is [1 0 1] and you apply it to a 2-D matrix or an image, then it will interpolate the value for the middle pixel or point by average values of right and left pixels. It is a sliding window run from left to right on the image, shifting one pixel at a time and interpolating. This is done to find simple contrast edges in an image.
Hope this helps.
I was also hitting my head before I could understand it.

This article has been dead for over six months. Start a new discussion instead.