run matlbab in sublime

  1. create new Build System
    Tools -> Build System -> New Build System,a new json file
{
    "cmd": ["E:/Softwares/MATLAB/R2014a/bin/matlab.exe", "-nodesktop", "-nosplash", "-r", "\"run('$file')\""],
    "selector": "source.m",
    "working_dir": "${project_path:${folder}}"
}

matlab -nosplash -nodesktop -r ${file_base_name} : open matlab and run file without .m extension
nosplash: don't load startup window
-nodesktop: don't open GUI window
-r: run matlab command window
file_base_name: file name without extension

type Ctrl+B
sublime will open MATLAB_command to compile file

modify file in sublime and save.
type file name in matlab_command window to recompile it.

reference:
https://www.jianshu.com/p/5c65a95c7137

你可能感兴趣的:(run matlbab in sublime)