DModelling Matlab Modelling Framework by David Meijer The code uses linear regression as an example but it's all about the framework. It can be adapted for use with many different models.