Joel,
That's really neat! Thanks for that trick. That might be the way to go.
My concern is that creates a n^2 matrix, and my n is 10k...
BTW, I know that octave/matlab's functions conv, conv2 and filter are very efficient in that regard. In fact, conv is a m-file that uses the c-file filter as a backend.
For example, I can simply conv(vector, coefficients).
Or, if I want the shift behavior, I can
conv2([vector; vector], coefficients, "valid") ## Using conv2 in the 1-d sense, not 2-d. Using conv2 instead of conv to use the "valid" feature.
The only problem is that they don't work when vector and coefficients are casadi objects.
It seems to me that it all hinges on a salient facility "filter" that might be nice to have in casadi some day.
An example of filter is, say, a signal-smoothing 30-day moving average filter..
I don't mean to sound like an ungrateful brat. Thanks for the neat n+1 trick! I will go play around with that more.