How could I fix this file path error?
조회 수: 4 (최근 30일)
이전 댓글 표시
Don't know how I can fix this filepath issue..
댓글 수: 0
답변 (2개)
Muskan
2024년 7월 15일
When you run a MATLAB file, your current folder (often displayed on the left hand side) must be the one where that file is stored. If you do not specify a path to a file, MATLAB looks for the file in the current folder or on the search path. Functions in the current folder take precedence over functions with the same file name that reside anywhere on the search path.
You can refer to the following documentation on MATLAB Search Path for a better understanding: https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html
You can also refer to the following documentation of Files and Folders That MATLAB Accesses: https://www.mathworks.com/help/matlab/matlab_env/files-and-folders-that-matlab-accesses.html
Image Analyst
2024년 7월 16일
Where does the MAT file actually live? If it is not in that folder, then type in the full path and name of the file.
댓글 수: 1
Image Analyst
2024년 7월 20일
Put the .mat file in the same folder as your m-file then set new path like this
newPath = pwd;
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!