How to pass the index of a loop from one MATLAB App to another in real time

1 view (last 30 days)
Say I have two app in MATLAB App Developer:
1) A button is pushed and a for loop iterates through 1:10, pausing every 5 seconds. Let the loop index value be stored as i.
2) A textbox value updates in real-time to the loop index value i from the first app.
How can this be done?
So far, I've been able to update the value in the text box, but only by calling the startup function so the second app opens and closes upon each iteration of the first app.

Answers (1)

dpb
dpb on 27 Jun 2022
One way is through a memory mapped file <Share-memory-between-applications>
Alternatively, although I've no familiarity with the Java implementation, one should be able to manage IPC (interprocess communication) through Java...although it might take lower-level code to be able to find the process IDs needed. I didn't find any examples thereof with MATLAB.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!