Sharing toolbox (built-in functions) with two different versions of Matlab

조회 수: 4 (최근 30일)
Hello,
I have access to two different versions of Matlab. I need to use optimization toolbox in Simulink. The problem is that the version of Matlab that has Simulink does not include optimization toolbox. The one that includes optimization toolbox does not have Simulink installed. I was wondering if there is a way to use the optimization toolbox of one verion of Matlab from another. I am specifically interested in using "lsqnonneg()" and "lsqnonlin()" functions from the optimization toolbox in Simulink. Thanks in advance.
Ernur

채택된 답변

Jan
Jan 2011년 3월 1일
You can run one Matlab version as an automation server, such that it can controlled remotely from the other version. See in the docs: External interface->MATLAB COM Automation server support and MATLAB COM client support.
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 3월 1일
An interesting approach -- but won't the version of Matlab chosen to serve the COM client depend upon the registry? If so then there could potentially be conflicts between running the two versions.

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Walter Roberson
Walter Roberson 2011년 3월 1일
This question is closely related to a recent question #2187 about mixing toolbox versions.

Walter Roberson
Walter Roberson 2011년 3월 1일
As directly calling a routine from a different toolbox version is unstable, you are left with possibilities such as Jan describes for communicating between two sessions each running Matlab.
You might be able to do so productively on the the same system by using memmapfile() -- but that approach will likely run into synchronization problems.
There is a Matlab File Exchange contribution for sharing memory between matlab sessions using shared memory.
There is a Matlab File Exchange contribution "tcpudpip" which can use tcp or udp to communicate between different Matlab sessions, even if they are not on the same system. Exchanging actual variables is a bit of a nuisance, though.

Ernur
Ernur 2011년 3월 2일
Thank you all for your time and discussions.
Jan's suggestion seems to be working so far. I will update you if there is a problem with that implementation. Thanks again.
Ernur

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by