cleaning MTEX functions
preallocation of variables and inversion of for loop and if statements, to speed up the calculations
updated link to MTEX on GitHub