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

3 views (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.

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!