Store Binary Trees in Matrices or Cells

The utilities manipulate matrices or cells which store binary trees.

You are now following this Submission

The utilities attempt to manipulate matrices or cells which store binary trees according to a predefined convention. The convention is outlined in the attached figure. tree2mtx.m translates from tree levels and elements into matrix indexes (Rows,Columns); chldoftmx.m finds the children of a node; apndtmx.m appends children of a node of one tree to a node of another tree.

Cite As

Abraham (2026). Store Binary Trees in Matrices or Cells (https://www.mathworks.com/matlabcentral/fileexchange/33889-store-binary-trees-in-matrices-or-cells), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.3.0.0

-Added function chldoftmx() to find children of a node in the tree matrix
-Added function apndtmx() that appends children of one matrix to a node of another

1.2.0.0

- fixed argument error handling
- added examples

1.1.0.0

- Fixed some mistakes in the help notes.
- Modified the script to accept array arguments.

1.0.0.0