Here's my ssatrend.m program. It is based on SSA routines from Eric Breitenberger. So, an acknowledgement goes to him.
SSA is short for singular spectrum analysis, which is a kind of temporal EOF or PCA analysis. The idea of the code is to find the non-linear trend (or smooth) of the input series when you account for oscillatory signals. It first decomposes the signal using SSA. This usually leads to a series of oscillatory components, a trend plus some noise. this code throws away everything except the trend. The trend component is commonly referred to the "nonlinear trend". For many input series the resulting nonlinear trend is very close to what you would get from a triangular bartlett filter.
Another improvement i've added is that i've added the possibility to use more complicated noise models for the 'measurement noise'. Note, however, that these complicated noise models may be incompatible with the bootstrap uncertainties (i have to look into that). I've also cleaned the code a bit to improve readability and added 'triangular filter' help-comment.
There were some blog-comments on climateaudit etc. about ssatrend padding uncertainties being wrong. However, the comments were all over the place on multiple blogs, so I had no energy to find out what they were talking about. Instead I made this bootstrapping improvement, which I have had in mind to do for a long time. An important design criteria for me is that the confidence interval calculation is non-parametric, so that it is generalizable to non-normal non-iid noise and that it can handle the extrapolation uncertainties.