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

3 ビュー (過去 30 日間)
Scott Young
Scott Young 2022 年 6 月 27 日
回答済み: dpb 2022 年 6 月 27 日
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.

回答 (1 件)

dpb
dpb 2022 年 6 月 27 日
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.

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by