Thanks for the variations, Rick. I just wanted to share the piece of code that I repeatedly found useful. My co's yet to make the step up from 9.20, which is slightly irritating because 9.22 has a decent set of functions introduced ... so instead of say, cuprod(x) which is available in 9.22, I use exp(cusum(log(x))) The loop increases the computation time drastically if this function is used within an optimization code. I noticed IML has this amazing speed-up (nearly 15x) for vectorized vs loop section (similar results to your blog post on running mean and variance).The results were a bit surprising because MATLAB hardly produced a 1.5x speedup for the same optimization code, and a fully vectorized optimization code in IML runs 3x faster than the same code in MATLAB!
... View more