I am working on a classification algorithm, for which I am training a decision tree in C++, via the mexFunction. I am storing all the nodes of the tree with their respective data points, each node also has some additional information. I have a pointer named "tree" which points/stores all the data. Now I want to get that tree in matlab with all its data, so that I can plot results. Is there a way to copy all the data via the tree pointer and export it to matlab?