행운을 빕니다. 사람들이 MATLAB의 판별을 바꾸지 않고 저장 경로를 바꾸는 작업에서 정확한 문제를 처리해야만하는 경우도 있습니다. 내 startup.m에있는 작은 함수를 작성하여 모든 사용자 정의 경로가 사용중인 MATLAB의 특정 버전에 대한 기본 경로 위에 추가되는지 확인합니다. MATLAB이 C : \ Program Files에 있다고 가정하고 있으므로 필요에 따라 변경할 수 있습니다. 당신의 startup.m에서
function setPathForNewVersion()
% Find all path strings which do not belong to toolbox folders
customFolders = regexp(strsplit(path,';'),...
'^(?!C:\\Program Files(\s\(x86\))?\\MATLAB\\R\d{4}(?:a|b)\\toolbox\\\S*)(.*)','match');
customFolderCells = [customFolders{cellfun(@(x)~isempty(x),customFolders)}]; % Remove empty cells
restoredefaultpath; % Momentarily
newPath = sprintf('%s;',customFolderCells{:});
path(newPath, path); % Add the user's custom path to the top
savepath;
end
는 당신은
function startup
setPathForNewVersion();
end
이 불행하게도 작동하지 않을 수 있습니다. sudo 권한을 가진 Matlab을 시작하더라도. – mcExchange
@mcExchange 그것은 작동하지 않습니다. – Suever
변경 사항은 영구적이지 않습니다. 그러나 gui를 사용하여 폴더 경로를 추가해도 영구적 인 것이 아니기 때문에 정말 이상합니다. 어쩌면 그것은 Matlab 2014a의 버그 일 것입니다 ... – mcExchange