远程桌面MATLAB启动失败问题解决

博客:博客园 | CSDN | blog

远程桌面打开MATLAB会报错,解决办法,打开matlab的licenses路径,如matlab/R2017b/licenses/,路径下存有license文件,如license_standalone.lic(可能为其他名字),打开文件,在每行如下位置添加TS_OK

matlab license
matlab license

行数较多,可通过执行如下脚本自动添加,注意,执行前先备份

1
2
3
4
5
6
7
8
9
10
11
license_path = './license_standalone.lic'

with open(license_path, 'r') as fr:
lines = fr.readlines()

with open(license_path, 'w') as fw:
for i, line in enumerate(lines):
if (line[-2] == '\\'):
continue
lines[i] = line[:-2] + ' TS_OK\n'
fw.writelines(lines)

参考

0%