VSCode配置matlab编译环境

本文主要内容是在VSCode中搭建matlab运行环境的过程。

VSCode配置matlab编译环境

需要安装Matlab相关插件,并对setting.json文件进行配置。

setting.json文件的{}中加入如下配置代码:

/***********************************
*  下面为matlab编译环境配置
***********************************/

    "matlab.mlintpath": "D:\\MATLAB\\bin\\win64\\mlint.exe",
    "matlab.matlabpath": "D:\\MATLAB\\bin\\matlab.exe",
    "matlab.linterEncoding": "gb2312", 

    "code-runner.executorMap": {
        "matlab":"cd $dir && matlab -nosplash -nodesktop -r $fileNameWithoutExt",
    },

    "files.associations": {
        "*.m":"matlab",
    },

    "code-runner.runInTerminal": true,

    "[matlab]": {
        "files.encoding": "gb2312",
    },
    
    "files.autoGuessEncoding": true,
    "workbench.colorTheme": "One Dark Pro Darker",
    "workbench.iconTheme": "vscode-icons",
    "search.smartCase": true,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.autoSave": "afterDelay",
    "terminal.integrated.commandsToSkipShell": [
        "language-julia.interrupt"
    ],
    "julia.symbolCacheDownload": true,
    "tabnine.experimentalAutoImports": true,
    "vsicons.dontShowNewVersionMessage": true,
    "editor.fontFamily": "Cascadia Code, 'Courier New', monospace",
    "security.workspace.trust.enabled": false,
    "editor.fontSize": 13,

需要注意 matlab.mlintpath 和 matlab.matlabpath 的地址是否能够和自己MATLAB安装后对应的子程序的地址相匹配。否则无法在VSCode中运行matlab代码。

你可能感兴趣的:(环境配置,vscode,matlab,ide)