updating matlab code for current version.