sublime配置matlab 图形不闪退
{
"cmd": ["D:\\Program Files\\MATLAB\\R2023b\\bin\\matlab.exe", "-nodesktop", "-nosplash", "-r", "run('$file'); uiwait;"],
"selector": "source.matlab",
"working_dir": "$file_path",
"shell": true
}
% 你的绘图代码
x = 0:0.1:10;
y = sin(x);
f = figure; % 必须创建窗口
plot(x,y);
grid on;
% 最后一行必须加这个!!
uiwait(f); % 等待关闭图窗才会退出
浙公网安备 33010602011771号