How to open a script in a running MATLAB instance with Windows Command Line?

조회 수: 22 (최근 30일)
埃博拉酱
埃博拉酱 2021년 7월 19일
댓글: 埃博拉酱 2021년 7월 19일
Double-click a script file in Windows File Explorer will open the script in a running MATLAB instance if it exists. Only when no instances are running will a new instance start. However in Windows commandline:
matlab SomeScript.m
This command will always start a new MATLAB instance, regardless of whether any instances are running. Is there a way to fully mimic the double-click behavior in Windows Commandline?
After all, how does MATLAB tell whether I'm calling it by double-click on a script or in cmd?

답변 (1개)

Smitesh Patil
Smitesh Patil 2021년 7월 19일
Here are all the options available while launching matlab from cmd. However there doesn't seem to be any option to open without starting new instance.
  댓글 수: 1
埃博拉酱
埃博拉酱 2021년 7월 19일
Then how is double-click processed? How can MATLAB treat a double-click differently?

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

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by