Undefined function or variable 'case1' each time I start Matab and run the file

1 次查看(过去 30 天)
I have to "set path" my files in C:\Users\..\Documents\MATLAB each time I start Matlab and run it. After setting the path, the file can be run but once I close Matlab and restart it, I have to reset the path again. Any help would be appreciated. Thanks

回答(1 个)

Adam
Adam 2016-12-7
编辑:Adam 2016-12-7
In the 'Set Path' dialog from the top ribbon there is a 'Save' option which should save for future sessions. I don't really understand what your question body has to do with your question title, but certainly for a persistent path across sessions you just need to save it.
savepath
will also do this programmatically.
  5 个评论
Ismaeel
Ismaeel 2016-12-7
编辑:Ismaeel 2016-12-7
Sorry for that. But what I mean is: I start Matlab and open my file and then run it, I get the above error. Now, I set its path and save it, run the file once again, it works fine. Close Matlab, open the file, and then run it, again I get the same error and then set path will fix it as long as I don't close Matlab. Once I close Matlab, I have to set the path for all my files.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Search Path 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by