Matlab implementation of Bayesian regression