Undefined function or variable 'case1' each time I start Matab and run the file
이전 댓글 표시
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개)
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
2016년 12월 7일
Ismaeel
2016년 12월 7일
You say 'every time I start Matlab and run my file'.
There is a big difference in those two aspects. If it happens when you start Matlab then that is an entirely different issue, but if you mean it actually happens just when you run a certain file then it just means exactly what the error says - your function does not find 'case1' and it is not on the path either. Without seeing the code I don't know if 'case1' is supposed to be a variable or a function or what.
Ismaeel
2016년 12월 7일
카테고리
도움말 센터 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!