필터 지우기
필터 지우기

Use an existing interactive MATLAB session with MATLAB Engine application

조회 수: 3 (최근 30일)
Szabolcs
Szabolcs 2013년 8월 26일
댓글: Danny S 2014년 6월 10일
How can I use an already running interactive MATLAB session as the computation engine for a MATLAB Engine application? I'm quite certain that I read that this was possible on Windows, if the interactive session was started in a special way. But I am having a hard time finding it in the documentation.
Any pointers would be most appreciated.
Clarification: in other words, I want to share the workspace between an interactive MATLAB session (full GUI) and an Engine application's MATLAB.
  댓글 수: 2
Ken Atwell
Ken Atwell 2013년 8월 27일
Can you elaborate a bit more on what you are trying to do? My initial reaction is, "why bother with the engine interface at all when there is an interactive session of MATLAB already running?"
Szabolcs
Szabolcs 2013년 8월 27일
편집: Szabolcs 2013년 8월 27일
Ken, it's for use with MATLink. That should explain why it's useful: share the workspace between the MATLink "instance" and the interactive "instance" (i.e. make them the same).

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

답변 (2개)

Szabolcs
Szabolcs 2013년 8월 27일
I found a solution for this. From the already running MATLAB session evaluate the command
enableservice('AutomationServer', true)
Start the Engine application afterwards and it'll share the workspace with the already running MATLAB. The full convenient GUI is available.
Note: this is a Windows-only feature.

Kaustubha Govind
Kaustubha Govind 2013년 8월 27일
I think you need to start MATLAB with the -automation flag from a command window to start it up as a COM Server. Not sure whether you can also use this as an interactive session also though.
  댓글 수: 1
Szabolcs
Szabolcs 2013년 8월 27일
편집: Szabolcs 2013년 8월 27일
Unfortunately you can't. The command window that appears is the same that I can already bring up for engine applications on Windows. But in the meantime I found another way. See my answer below.

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

카테고리

Help CenterFile Exchange에서 Call MATLAB from C에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by