有时需要长时间运行仿真模型,会选择使用加速模式( accelerator),加速模式初期需要花费一定时间编译,但后期的运行速度会比普通模式快很多。
使用加速模式时Simulink会在当前文件夹生成一个.acc的加速文件,但Matlab不允许在它的根目录下写入文件,所以如果当前文件夹/current folder是Matlab的根目录,就会出现形如
“Your current working folder is:
E:\MATLAB\R2014b\bin
Simulink does not permit you to modify the MATLAB installation area.
Please change to a working folder that is not in the MATLAB
installation area and re-try the previous command.”的报错

解决方法是修改Matlab的当前文件夹/current folder
更无脑的方法时,每次打开模型时都直接双击模型,不要先打开Matlab再打开模型。
使用加速模式时Simulink会在当前文件夹生成一个.acc的加速文件,但Matlab不允许在它的根目录下写入文件,所以如果当前文件夹/current folder是Matlab的根目录,就会出现形如
“Your current working folder is:
E:\MATLAB\R2014b\bin
Simulink does not permit you to modify the MATLAB installation area.
Please change to a working folder that is not in the MATLAB
installation area and re-try the previous command.”的报错

解决方法是修改Matlab的当前文件夹/current folder

更无脑的方法时,每次打开模型时都直接双击模型,不要先打开Matlab再打开模型。