Mac Warning: Name is nonexistent or not a directory
9 views (last 30 days)
Show older comments
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?



0 Comments
Answers (1)
Image Analyst
on 11 Jan 2024
Edited: Image Analyst
on 11 Jan 2024
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 Comments
Image Analyst
on 12 Jan 2024
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.
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!