prototype for random forest methods in matlab