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

1 visualización (últimos 30 días)
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.

Respuestas (1)

dpb
dpb el 27 de Jun. de 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.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by