May alter the morphology slightly!

Repairs tree intree. This means removing trifurcations by adding small segments (see “elimt_tree”), removing 0-length compartments (see “elim0_tree”), and sorting the indices topologically (see “sort_tree” with “-LO” option). Applying this function is crucial for many other functions in this toolbox, which assume for example BCT-conformity. Importing tree (e.g. with “load_tree”) automatically calls this function.

Example:

>> repair_tree (tree)

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License