Data communication between multiwindow App in Mablab/App designer (1)

Searching the key words as “multi app matlab” in google, you can easily find the office tutorial from mathwork.com for creating multiwindow App in Appdesigner.

For this tutorial, first point to note is the version of Matlab. Actually, this tutorial is only available from the version 2017b. In other word, before this version, you can just create one Windows App. It was very annoying.

“Annoying”的图片搜索结果

It use the paramter of the startup function as bridge between the main and dialog window.  (startup function is first loaded when the app is launched.)  In the tutorial, it updates the data of main window when the dialog window is closed.  You can also create a update function to synchronize the data when you want.  For example, if your want to display the temperature in the main window, but the temperature is measured from the dialog window. Once the temperature value changes in the dialog window, the update function will called to update the displayed value in main window.  It worth noting that the update function must be a public function because it will be called by any other (dialog) app, and it should be in the main window app. 

In the tutorial, it pass more than one parameter in the startup function. However, the first parameter is the calling app which includes all the parameters of the calling app (all the parameters in main window).  So, you don’t need to pass other parameters as mentioned in the tutorial.  If you need the parameter of the main window,  just using callingApp.parameter. ( callingApp = MainApp defined the in the startup function of the dialog app.)

“Annoying”的图片搜索结果

News Reporter

1 thought on “Data communication between multiwindow App in Mablab/App designer (1)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Skip to toolbar