Running MATLAB scripts from Sublime Text 3 without opening new instances

Good day,

I am a fairly inexperienced code writer since my only experience with MATLAB. However, I will soon learn all about Python and it was recommended that I use Sublime Text as my editor. At the same time, I would like to get an idea of ​​the editor using it for my MATLAB tasks and I am having problems with it working so that I can run MATLAB scripts from Sublime without opening a new MATLAB instance every time I run the code. Can anyone help me?

I am using Windows 7 Ultimate x64, MATLAB 2013B and Sublime Text 3. Right now I am building my scripts using

{
 "cmd": ["C:/Program Files/MATLAB/R2013b/bin/matlab.exe", "-nodesktop", "-nosplash",
        "-r", "\"run('$file')\""],
"selector": "source.m",
"working_dir": "${project_path:${folder}}"
 }

      

I'm not sure if I want nodektop, but I can just take that away. The point is that this opens a new MATLAB screen every time, which takes a while and seems like overkill.

I would post this on a sublime forum, but it doesn't seem to work for me.

+3


source to share


1 answer


You will need to run MATLAB as a server unless you need a new instance for each call. I'm afraid I can't help you with the details, but you can look at the MATLAB Automation Server page in the official documentation. And then learn how to call COM objects from Python, perhaps using PyWinAuto . Good luck.



PS Yes, the Sublime Text forum is for me too. It's been five days already. Not good.

+1


source







All Articles