Matlab utilities by Ying Xiong