- Use the uiwait function to pause the execution of the main script after the 'sub.mlapp' is launched.
- Create a button in the 'sub.mlapp' and in its callback function gather the necessary data and use uiresume function to continue the main script. E.g.
- https://www.mathworks.com/help/matlab/ref/uiresume.html
- https://www.mathworks.com/help/matlab/ref/uiwait.html