How to transfer data between two applications?

26 次查看(过去 30 天)
There are two applications A and B, I want the data I enter to be transmitted to application B when the button is clicked. Example attached:
Thank you in advance!

采纳的回答

Jon
Jon 2022-5-24
In appA add an instance of appB as a property (and assign it in the startup function).
In appB assign a property for the data you want to transmit.
In the callback for the button press in appA assign a value to appB's property using your instance of appB
app.appB.data = data
  3 个评论
Lev Mihailov
Lev Mihailov 2022-5-25
@Jon enter a value from 1 to 10 in the input menu, click on the button (ans data), the value that we entered is displayed, and a new window opens. When the button (ans date A) was pressed, the answer that we entered in the first window was displayed.
Jon
Jon 2022-5-25
I have modified your attached files to provide an example of how you can do what you describe. I commented out some of your code which was not used. You can of course futher modify from here, renaming variables/properties with more meaningful names etc

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by