Last active
August 17, 2017 14:21
-
-
Save nrubin/5088096 to your computer and use it in GitHub Desktop.
Build System for Sublime Text 2 for MATLAB files on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["C:\\Program Files\\MATLAB\\R2012b\\bin\\matlab", "-nosplash", "-nodesktop", "-r", "run('$file_name')"], | |
"selector": "source.m" | |
} |
Also, to get Sublime Text 2 to nicely recognize .m files as MATLAB files, go to View > Syntax > Open all with current extension as.... and select MATLAB.
thanks nrubin!
This works great, thanks!
Note to future users: remember to change the path to your build, mine was R2013a
when using this a matlab command window appears and runs the script. The problem Im having is that multiple runs of a script cause multiple command windows to open. These are multiple full fledged instances of matlab! I cant figure out how to make it use instance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Sublime Text 2 in Windows, navigate to Tools > Build System > New Build System, copy the above code into that file, and save the file as "matlab.sublime-build" in the directory Sublime recommends saving it to. Now, when you build a .m file in ST2, a lite version of MATLAB will open up and run your code. woo!