fixed dimension consistency check in Matlab interface; thanks, Rien