필터 지우기
필터 지우기

Is it possible to share a variable from one MATLAB instance to a different MATLAB instance

조회 수: 4 (최근 30일)
For example, if i package a MATLAB app and open that up it creates a new matlab instance. Would it be possible to get these variable from this "external" app to a new matlab instance which has its own workspace?
Ive tried assignin, which works if I do not package the app and lauch the app from that single matlab instance. However if i package it up and have it use its own it doesnt share the variable.

답변 (1개)

Vilém Frynta
Vilém Frynta 2023년 3월 17일
Easiest solution would be to save your variables through workspace or via ‘save’ command. Then, in your script, include loading up the .mat file and your variable will be loaded into your current workspace. This way, you will need 2 files, script file and the file with variables. I know you probably wished for only one file (script), but I don't think that is possible unless it's something simple that you can mimic (basically create/generate).
Hope I helped.

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by