convlv: which ans[] to use?


Curt Stewart
06-01-2007, 11:37 AM
I'll just get this disclaimer out of the way: I am a novice programmer and this is my first foray into scientific computation.

I have sucessfully compiled the NR libraries into my Mac OS X Tiger application. I need to smooth out some real-time noisy data and am using savgol coefficients to drive convlv. At every tic that the data changes I update data[1..n] like this:

data[current, current-1, current-2, ..n]

It all seems to be working but a question lingers...



convlv returns ans[1..n*2] and I'm a little confused as to which ans[] to use; is it simply ans[1]? Is that ans[current]? The fact that the answer array is larger than the input data array confuses me a bit.

Actually, it confuses me a lot. :)