remove a bug about specifying the path for .mat file, make it compilable in Mac OS.