The code is based on a very simple function: generate_tree.mTo see how to use it, have a look at this simple demo: artree_demo.m
The tree generator has been used in a series of articles (listed at the bottom of this page) to generate artificial datasets with binary trees and (degenerated) left and right unary-trees (sequences). An example of how this is done is here: artree_demo_TNN.m
The code is provided as-is with no warranty and technical support. Please inform the author (Davide Bacciu) if you intend to redistribute the code.