- Check your current path: Click on the "Set Path" button in the MATLAB home menu and check if the current path includes the folder where your script is saved. If not, you can add the folder to the path by clicking on the "Add Folder" button.
- Save your script in a default folder: You can try saving your script in the default MATLAB folder (usually "Documents/MATLAB") and see if that resolves the issue.
- Check your startup settings: MATLAB may be starting up with a default path that is causing the issue. To check this, go to the "Preferences" menu and click on "MATLAB" on the left-hand side. Then, click on "Startup" and make sure that the "Start Folder" is set to a default MATLAB folder.
- Restart MATLAB: Sometimes, simply restarting MATLAB can resolve path-related issues.
File is not found in current folder or on the Matlab path.
조회 수: 495 (최근 30일)
이전 댓글 표시
Hi guys! I have the same problem with any new script I’d like to run: Every time I run a new Script Matlab wants me to „Change Folder“ or „Add to Path“. I can click on either of those buttons but nothing changes. I also tried to change the Path by the „Set Path“ button in the home menu and it has the same outcome. I hope you guys can help me!
댓글 수: 0
답변 (2개)
Ankit
2023년 5월 3일
Hello! It sounds like there may be an issue with your MATLAB path settings. Here are a few things you can try:
If none of these solutions work, you may want to contact MATLAB support for further assistance.
댓글 수: 1
Astronaut
2024년 9월 23일
How do I chane the matlab path becase it's on C:\Users\User\OneDrive\Documents
Image Analyst
2023년 5월 3일
You get that message when the m-file you're in, in the editor, and trying to run, does not live in the "Current folder" shown in the panel to the left. I always click "Change folder". You should be OK then. If you don't want to see that then right click on the name of the file (the tab) and select "Change folder to whatever" and it will change the folder before it runs the file.
댓글 수: 0
참고 항목
카테고리
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!