Please change your current directory to a writable directory preferably outside of MATLAB installati

simulink  使用自带函数fuction

用这个自定义函数编写了程序,运行时出现这个错误,但是在别人的电脑上面运行正常,求高人指点

 


Error using ==> construct_error at 109
The current directory is d:\program files\matlab\r2011a\bin, which is reserved for MATLAB files.

Please change your current directory to a writable directory preferably outside of MATLAB installation area.
The current directory is d:\program files\matlab\r2011a\bin, which is reserved for MATLAB files.

Please change your current directory to a writable directory preferably outside of MATLAB installation area.

 

解决了,是路径设置不对,在file--set path 点开后,add folder添加一个program file--MATLAB以外的路劲(最好不是中文路径,此步可以省略,直接进行下一步),将MATLAB主界面的current folder路径改成一个program file--MATLAB以外的路径,并将已经建立好的.mdl文件复制到current folder路径的文件夹下,再从该路径打开.mdl文件就ok了

 

主要在mtlab 按照路径外, 新建一个文件夹,然后在matlab中添加路径 ,然后将建好的模型放进文件中,再从matlab 中打开,就可以了

你可能感兴趣的:(matlab,Path)