It is the fact that his code is more efficient due to c++ implementation. The whole idea here is just following him. However, this version is more convenient for those who are not familar with mxed programming with c++ since this is written by matlab only.