I am making a GUI, and would like to create a new structure and be able to use it within the GUI script to add new fields after different events of different components of the GUI.
I have created the structure in the opening function as follows:
patient = struct();
After debugging, I realized the structure would be erased after the opening function. I try different forms of guidata() function to update it, but cannot seem to find an answer.