MATLAB / 其他 / 编程语言 · 2023年3月5日 0

在VSCode中配置matlab编译环境

  1. 首先安装好matlab软件以及vscode。
  2. 在vscode中安装以下插件:matlab、matlab-formatter、code runner、
  3. 在settings.json文件中的{}中添加以下配置代码:

/***********************************
* 以下为matlab环境配置
***********************************/
/*Matlab路径配置*/
“matlab.mlintpath”: “D:\\MATLAB\\bin\\win64\\mlint.exe”,     /**/
“matlab.matlabpath”: “D:\\MATLAB\\bin\\matlab.exe”,
“matlab.linterEncoding”: “gb2312”, /*采用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,

  1. 保存,完毕!