addpath and genpath duplicating the first part of chosen path
I’m trying to set up my file access for a script, but MATLAB’s addpath and genpath functions keep duplicating the first part of the file path. This, obviously, throws an error, but I can’t for the life of me understand why it does this. Has anyone else experienced a similar problem?
fullfile(pth{2}, fpth{1})
ans =
"Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions"
addpath(fullfile(pth{2}, fpth{1}))
Warning: Name is nonexistent or not a directory: /Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions
> In path (line 109)
In addpath (line 96)I’m trying to set up my file access for a script, but MATLAB’s addpath and genpath functions keep duplicating the first part of the file path. This, obviously, throws an error, but I can’t for the life of me understand why it does this. Has anyone else experienced a similar problem?
fullfile(pth{2}, fpth{1})
ans =
"Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions"
addpath(fullfile(pth{2}, fpth{1}))
Warning: Name is nonexistent or not a directory: /Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions
> In path (line 109)
In addpath (line 96) I’m trying to set up my file access for a script, but MATLAB’s addpath and genpath functions keep duplicating the first part of the file path. This, obviously, throws an error, but I can’t for the life of me understand why it does this. Has anyone else experienced a similar problem?
fullfile(pth{2}, fpth{1})
ans =
"Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions"
addpath(fullfile(pth{2}, fpth{1}))
Warning: Name is nonexistent or not a directory: /Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Users/David/Library/CloudStorage/GoogleDrive-dblair@gsu.edu/My Drive/Calhoun/Functions
> In path (line 109)
In addpath (line 96) file path MATLAB Answers — New Questions









