A matlab implementation of Supervised learning algorithm