Can't load file from path (MacOS) ?

52 views (last 30 days)
Feel stupid for asking this question, but I can't find a solution. I want to load a file from another folder (other than the "Current Folder") in my script and I can't seem to do it.
When I obtain the path location from "Get Info" on my Macbook, it is: "/Users/herbertmiddleton/Desktop/UA/ SEMESTRE 4/ THESIS/WRITING/(v) Review Article". The specific file name is "Bioprinting WOS.txt".
However, when I try to load the data in MATLAB, either by:
graph=load('/Users/herbertmiddleton/Desktop/UA/ SEMESTRE 4/ THESIS/WRITING/(v) Review Article/ Graphs/Bioprinting WOS.txt')
%or
graph2=load('Macintosh HD/Users/herbertmiddleton/Desktop/UA/ SEMESTRE 4/ THESIS/WRITING/(v) Review Article/ Graphs/Bioprinting WOS.txt')
The following error messages appear:
Error using load
Unable to read file 'Macintosh HD/Users/herbertmiddleton/Desktop/UA/ SEMESTRE 4/ THESIS/WRITING/(v) Review Article/ Graphs/Bioprinting
WOS.txt'. No such file or directory.
Error in untitled2 (line 4)
graph=load('Macintosh HD/Users/herbertmiddleton/Desktop/UA/ SEMESTRE 4/ THESIS/WRITING/(v) Review Article/ Graphs/Bioprinting WOS.txt')
Can anyone help? Thank-you!

Accepted Answer

Abderrahim. B
Abderrahim. B on 18 Jul 2022
Hi
Bioprinting WOS.txt file name has a space in between. LOad function will not work in this case.
You can rename the file to Bioprinting_WOS.txt.
hope this helps

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!