Mac Warning: Name is nonexistent or not a directory
이전 댓글 표시
I tried running a code I received from someone on both my M1 Macbook and Windows laptop. Without changing anything in Matlab, the code runs perfectly on the windows laptop. However, I am getting the Name is nonexistent or not a directory warning on my mac. Please see pictures below. I have made sure the subfolders are added to path under Set Path. I have also tried restoredefaultpath & savepath, and
>> edit pathdef.m. But they don't seem to work. Could someone please help?



답변 (1개)
Image Analyst
2024년 1월 11일
편집: Image Analyst
2024년 1월 11일
1 개 추천
Does the mac care about the direction of the slash in the path (Windows doesn't)? Try using all forward slashes. Try leaving off the training slash wherever you use it? How are you constructing the file paths in those folders? Are you using fullfile? If not you should.
댓글 수: 5
Walter Roberson
2024년 1월 11일
Mac does care about the direction of the slash -- it must be / for the Mac.
madhan ravi
2024년 1월 11일
I'm just wondering why there is a \ at the end of the path in the warning message
Walter Roberson
2024년 1월 11일
The user has incorrect addpath calls.
Vanessa Chung
2024년 1월 11일
Image Analyst
2024년 1월 12일
Glad we solved it. Since this Answer solves your question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!