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

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (1)

dpb
dpb il 27 Giu 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.

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by