MATLAB: How to share data between 2 or more callback function in App Designer

appbetweencallbackdatadesignerfunctionsMATLABshare

How to share data between 2 or more callback function in App Designer.

Best Answer

Please find attached sample App that demonstrates this with an example. In the App, "StartTests" button callback sets the data to plot and "ProessData" button would plot the data that was set in "StartTests" button callback. Thus, data is shared from StartTestsButtonPushed to ProcessDataButtonPushed function.
For more information regarding this, please refer to this documentation link: