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:
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?