Got lost in 2169341639 and 9ab832de01 Also adapted it to new 4.6 mex-calling syntax
2169341639
9ab832de01