In Matlab, how can I run 2 separate programs simultaneously, each turned on and off by separate buttons.
2 ビュー (過去 30 日間)
古いコメントを表示
For example, I have Program 1 & Program 2, when I run commandPrograms program it will open up two buttons. One button will turn on and off Program 1, and the other Program 2. I can turn on and off each one separately.
All programs in Matlab.
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 4 月 1 日
WIth relatively new versions of MATLAB, you might be able to take advantage of backgroundPool and parfeval the functions. parfeval() returns a future; you can have callbacks cancel futures.
Note however, that background pools are restricted in the features they can use. There are more features available if you have Parallel Computing Toolbox and use parpool and parfeval (technically a different function than the previously mentioned one)
But either way, background pool or parallel pool, tasks created in this way cannot directly interact with graphics that are visible on the screen. They can create graphics and capture frames in the created graphics, but they cannot themselves display anything visible to the user, and cannot ask the user for input.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!