revise functions for preprocessing and classifier to ensure that they can work correctly, there were some little tricky error in those functions. Now i can say the results are correct and the same as the result from Matlab