fix local cmake
fix code style
add matlab scripts