Fixes ompatibility problems with Matlab R2013

Lot of fixes + compatibility problems with Matlab R2013 …
Merge pull request #1 from erplab/erplab_4.0.2.5

Fixes ompatibility problems with Matlab R2013