load ionosphere % contains X and Y variables
ctree = ClassificationTree.fit(X,Y)
load carsmall % contains Horsepower, Weight, MPG
X = [Horsepower Weight];
rtree = RegressionTree.fit(X,MPG)
There are two ways to view a tree:
view(tree) %returns a text description of the tree.
view(tree,'mode','graph') %returns a graphic description of thetree.
Ynew = predict(ctree,mean(X))