mathlab interface(bug fixing)