The goal is to get access to the app's handle. Once you have access to the app's handle, you have access to anything within the app. Also see Matlab's documentation on multi-window apps.
Here are two ways to get the app's handle.
Evoke app #2 within app #1.
Within the startupFcn or within any callback function of an app, open the second app and store its handle.
For more info & demos on this method
Find the handle to an app that's already opened
The HandleVisibility of UIFigures is set to off by default which makes it a bit more difficult to find a UIFigure (or app) handle. The code below finds all figure handles and then isolates the handle that belongs to your app.
allfigs = findall(0,'Type', 'figure');
app2Handle = findall(allfigs, 'Name', 'MyApp');
Importantly, "MyApp" in the example above is the name of the app's figure (not necessarily the name of the app). It requires a unique name that can be distinguished from any other figure name.
To name your app's figure,
- open your app in AppDesigner and go to Design View
- Select the figure background or the top-most component in the Component Browser
- From the Inspector list of properties, scroll down to "Identifiers"
- use the "Name" property to name your app's figure. This name will appear in your new app figure.
Make the app handle available from anywhere within the app.