added Matlab interface