Global variables and multiple licenses of Matlab

조회 수: 3 (최근 30일)
Wouter
Wouter 2013년 2월 28일
Hello everyone,
At the moment I'm running multiple Matlab licenses on the same computer. My analyses utilize the same function m-file which uses global variables.
Can anyone tell me if these different instances of Matlab are able to access and use the single function file, without interfering with one anothers calculations?
Thanks in advance!

채택된 답변

Daniel Shub
Daniel Shub 2013년 2월 28일
Each instance of MATLAB is completely independent. Things like global variables are local to the instance of MATLAB that created the variables. If you are accessing hardware like a disk or serial port you can run into problems. Potentially doing things on a GPU could be problematic. In general you shouldn't have any problems.

추가 답변 (2개)

Jan
Jan 2013년 2월 28일
편집: Jan 2013년 2월 28일
In fact, the other way around is complicated: Sharing variables between Matlab sessions requires very smart strategies, see FEX: sharedMatrix.
But beside the warning, that global variables are a bad programming style, you can run into troubles, when you store them temporarily on the disk due to collisions.

Wouter
Wouter 2013년 2월 28일
Good to know, thank you both!

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by