Matlab implementation of the naive bayes