mile stone:
1. fixed compilation errors caused by diffs between vc compiler used by mex and g++ complier used by codelite
2. matlab script + cpp is done.