klreg matlab source code

2014.3.23