MI-Matlab code and docs