I tried to run the basic regression tree example in Matlab, I got the error message:
Undefined variable "RegressionTree" or class "RegressionTree.template".
Error in fitrtree (line 140) temp = RegressionTree.template(varargin{:});
Error in Testfile (line 6) tree = fitrtree([Weight, Cylinders],MPG,…
The code is from the Documentation "fitrtree" first example (<http://www.mathworks.com/help/stats/fitrtree.html)>, which is :
load carsmall;
tree = fitrtree([Weight, Cylinders],MPG,… 'categoricalpredictors',2,'MinParentSize',20,… 'PredictorNames',{'W','C'})
Best Answer