Implementation of Machine Learning Algorithms in Matlab and C++