How to specify path in MATLAB?
Show older comments
Hello, I'm having a problem with pathing in MATLAB. To path to the folder with the data for the script I use;
folder = '//uofa/users$/users4/a1225844/MATLAB/Stripflow/Col1/Col_0/'
The following errors pop up;
Error using fgetl
Too many output arguments.
Error in fgetl (line 34)
[tline,lt] = fgetl(fid);
Error in read_singlestack_input_v1_0 (line 12)
dat_line = fgetl(fid);)
For this script these errors always occur when the path is incorrect. Currently, the only folder in Col1 is Col_0.
Since it was running on a network location, I tried copying files onto the C: drive and running it from there. I tried changing folders on the search path by going to the Home tab-->Environment section-->Set path-->Add folder-->//uofa/users$/users4/a1225844/MATLAB/Stripflow/Col1/Col_0/-->Save. I tried eliminating the $ in users$, this made MATLAB 'think' for a minute before giving the same errors. I tried using double quotes rather than single quotes, putting parentheses around it, and using the backwards slash rather than the forwards slash. For each one, the same error messages popped up.
I just started learning MATLAB, so sorry if this is a stupid question.
Accepted Answer
More Answers (0)
Categories
Find more on File Operations 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!