The old implementation of the paper.

This should work ok. The parameters probably have to be fine-tuned for real-life data, but it is easily possible using the constraints for fmincon.