MATLAB Examples

Use App Designer to Display Items in a Tree

This app shows how to add a tree to an App Designer app programmatically. The app selects data from patients.mat and displays it in a hierarchy using a tree. The tree contains two nodes that display hospital names. Each hospital node contains nodes that display patient names. When the user clicks a patient name in the tree, the Patient Information panel displays data such as age, gender, and health status. The app stores changes to the data in the table variable.

In addition to the tree and Patient Information panel, the app also contains the following UI components:

  • Read-only text field — Used to display the patient’s name
  • Numeric edit field — Used to display and accept changes to the patient’s age
  • Drop-down list — Used to display and accept changes to the patient’s gender and health status
  • Check box — Used to display and accept changes to the patient’s smoking history