How to transfer data between two applications?

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일

0 개 추천

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

Jon
Jon 2022년 5월 24일
I downloaded your two apps but am not clear on the details of how the demonstration should work. Can you please explain step by step what the user would enter, press, and what you would then like to happen.
@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개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2022년 5월 24일

댓글:

Jon
2022년 5월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by