Info

This question is closed. Reopen it to edit or answer.

Should <matlabroo​t>\toolbox​\matlab\co​detools\ja​\ be in the search path? Solved!

1 view (last 30 days)
When I started R2013a today, 446 warnings like this one were displayed.
Warning: Function C:\Program Files\MATLAB\R2013a\toolbox\matlab\codetools
\ja\dbclear.m has the same name as a MATLAB builtin. We suggest you rename the
function to avoid a potential name conflict.
I have never seen anything like this before. ...\ja\dbclear.m seems to be a help-file with "strange" encoding.
...\toolbox\matlab\codetools\ja\ is in the Matlab search path
>> which dbclear -all
built-in (C:\Program Files\MATLAB\R2013a\toolbox\matlab\codetools\dbclear)
C:\Program Files\MATLAB\R2013a\toolbox\matlab\codetools\ja\dbclear.m % Shadowed
>>
Question:
  • Should C:\Program Files\MATLAB\R2013a\toolbox\matlab\codetools\ja\ be the in Matlab search path?
  • If so, what is going on?

Answers (1)

per isakson
per isakson on 18 Aug 2013
Edited: per isakson on 18 Aug 2013
Solution ID: 1-8T166L answers my first question; the folders in question should not be in the path. (Tech-support helped me find that answer.) I cannot figure out how the folders were added to the search path.
I removed the folders from the search path with the function, remove_paths_Solution_ID_1_8T166L (attached below). Steps:
  • copy all the warning messages to a text file, e.g. named name_conflict.txt
  • run remove_paths_Solution_ID_1_8T166L(fullfile(folderspec,name_conflict.txt)). The folders are removed, but the search path is not saved.
  • inspect the search path and use Matlab
  • if "everything" is ok, save the search path, if not, close Matlab without saving the search path.
function folder_list = remove_paths_Solution_ID_1_8T166L( filespec )
% http://www.mathworks.se/support/solutions/en/data/1-8T166L/index.html
% Solution ID: 1-8T166L
% Subject: Why do I get "same name as a MATLAB builtin" warnings on startup?
narginchk( 0, 1 )
if nargin == 0
filespec = 'h:\m\Code2TMW\Path_potential_name_conflict.txt';
end
fid = fopen( filespec );
cac = textscan( fid, '%s', 'Delimiter', '\n' );
fclose( fid );
expr = '(?<=Warning: Function ).+?(?= has the same name as a MATLAB builtin)';
folder_list = cellfun( @(str) fileparts(char(regexp(str,expr,'match'))) ...
, cac{1}, 'uni', false );
folder_list = unique( folder_list );
cellfun( @rmpath, folder_list )
end

Community Treasure Hunt

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

Start Hunting!