On Startup: function name warning
Show older comments
I always find those problems when i begin to matlab...and then the following problem occurs in CONN toolbox. is this linked??? The error occurs when trying to use slice time viewer with MNI bounderies...
Please help, I will be very thankfull!!!!
kind regards
Till
MATLAB:
Warning: Function iscolumn has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function ismatrix has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function isrow has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Function narginchk has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function isequaln has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function contains has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function endsWith has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function newline has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Function startsWith has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: Function isfile has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Function isfolder has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
PsychStartup: Environment variable GSTREAMER_1_0_ROOT_X86_64 is undefined.
PsychStartup: Either GStreamer-1.16 MSVC is not installed at all, or if it is installed then something
PsychStartup: is botched. Trying various common locations for the GStreamer runtime to keep going.
PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\x86_64\bin]
>>
CONN:
ERROR DESCRIPTION:
Error using strfind
PATTERN must be a string scalar or character vector.
Error in contains (line 36)
tf = ~cellfun(@isempty, strfind(s, pattern));
Error in matlab.ui.internal.prepareFigureFor
Error in rotate3d (line 171)
matlab.ui.internal.prepareFigureFor(f, mfilename('fullpath'));
Error in conn_slice_display (line 451)
set(rotate3d,'ActionPostCallback',{@conn_slice_display_refresh,'position'});
Error in conn (line 2302)
else fh=conn_slice_display(fullfile(fileparts(which(mfilename)),'utils','surf','referenceGM.nii'),CONN_x.Setup.structural{nsubs(1)}{nsess(1)}{1},[],.25);
CONN18.b
SPM12 + DEM FieldMap MEEGtools cat12
Matlab v.2019b
project: CONN18.b
storage: 366.1Gb available
spm @ D:\spm12
conn @ D:\conn18b\conn
8 Comments
Looks like whatever 3rd party toolbox you are using creates a number of functions whose names clash with those of already existing Matlab functions. I've no idea what the particular one is you are using, but you can either not use it, ignore the warnings if it still works (though some of those warnings towards the end sound quite fundamental) or rename all the clashing functions or contact the authors of the toolbox to ask them.
I rarely use large libraries/toolboxes of 3rd party code unless from a completely trusted source, as I don't want to have to deal with these kind of issues of them over-riding builtin functions.
I agree with Adam. If a single toolbox results in that many overshadowed functions, to me that's a red flag about the quality of that toolbox. Good programmers wouldn't overshadow that many built-in functions. An execption would be if the toolbox was very old and was created prior to Matlabs built-in function releases but that doesn't seem to be the case here (some of those functions are >9 years old). I would remove the toolbox from your Matlab path and only add it when you must use that toolbox (or don't use it at all - again, red flag).
To remove paths,
or, move the files to a directory that isn't added during setup.
Till Langhammer
on 6 Dec 2019
Ugh, what badly named files in that toolbox. Two options (which seem to have already been discussed) to avoid those warnings:
- removing the toolbox from the path (simple, but counter-productive if you want to use it),
- renaming the functions (not easy, best done with a good text editor),
A third option is to move those functions to private subfolder/s in that toolbox, to limit their scope:
This is exactly the situation that private folders were intended for.
Note that the warnings seem to relate to a different toolbox than that error.
Adam Danz
on 6 Dec 2019
I'd be careful with renaming the functions. That would require you to search for each of those function names within all of the toolbox files and change all of the calls to those functions. If you miss one, it will call the wrong function (it will call Matlab's built-in function rather than the renamed function). Also, you could accidentaly rename a function call that shouldn't have been changed.
Moving the toolbox files to a private folder that is only added to path when needed (and then removed from path) is good idea.
"Moving the toolbox files to a private folder that is only added to path when needed (and then removed from path) is good idea."
That is not what I suggested.
Private folders cannot be explicitly added to the MATLAB Search Path, nor can they be expliclty removed. Nor is there any point in adding or removing a private folder from the Search Path anyway, as their scope is automatically limited (which, as I wrote earlier, is the point of using them).
Attempting to add a private folder to the MATLAB Search Path gives this warning:

and the private folder is NOT added to the Search Path (nor can it be).
I recommend reading the link I gave to understand what private folders do:
Till Langhammer
on 6 Dec 2019
Answers (2)
Adam Danz
on 6 Dec 2019
None of the toolboxes are crashing - those are just warnings that you've got two functions with the same name.
Don't delete all toolboxes! You just need to find the one that's causing problems and move it to a different directory that isn't on your matlab path. Keep it - someone might need it.
To find the directory of the functions that have bad names, by using which():
which iscolumn -all
That will return a list of files that have that name including Matlab's files. Do that for several of the functions listed in the warnings and hopefully you'll see a pattern of where they are stored and which toolbox that are associated with (if any). Make sure you're not messing with Matlab's files, though. Don't move them and certainly don't delete them. Only change the unwanted files. You can moved them to a new directory.
2 Comments
Till Langhammer
on 6 Dec 2019
The spm12 thing is definitely the culprit. Don't delete anything. Just move the custom files that are causing problems so they are no longer on Matlab path, restart matlab, and see if the problem goes away. But you probably shouldn't delete those files ever since others may need them at some point.
For comparison, here's the results using Matlab Online
which iscolumn -all
built-in (/MATLAB/toolbox/matlab/elmat/iscolumn)
built-in (/MATLAB/toolbox/matlab/elmat/@cell/iscolumn) % Shadowed cell method
built-in (/MATLAB/toolbox/matlab/elmat/@char/iscolumn) % Shadowed char method
built-in (/MATLAB/toolbox/matlab/elmat/@double/iscolumn) % Shadowed double method
built-in (/MATLAB/toolbox/matlab/elmat/@int16/iscolumn) % Shadowed int16 method
built-in (/MATLAB/toolbox/matlab/elmat/@int32/iscolumn) % Shadowed int32 method
built-in (/MATLAB/toolbox/matlab/elmat/@int64/iscolumn) % Shadowed int64 method
built-in (/MATLAB/toolbox/matlab/elmat/@int8/iscolumn) % Shadowed int8 method
built-in (/MATLAB/toolbox/matlab/elmat/@logical/iscolumn) % Shadowed logical method
built-in (/MATLAB/toolbox/matlab/elmat/@single/iscolumn) % Shadowed single method
built-in (/MATLAB/toolbox/matlab/elmat/@struct/iscolumn) % Shadowed struct method
built-in (/MATLAB/toolbox/matlab/elmat/@uint16/iscolumn) % Shadowed uint16 method
built-in (/MATLAB/toolbox/matlab/elmat/@uint32/iscolumn) % Shadowed uint32 method
built-in (/MATLAB/toolbox/matlab/elmat/@uint64/iscolumn) % Shadowed uint64 method
built-in (/MATLAB/toolbox/matlab/elmat/@uint8/iscolumn) % Shadowed uint8 method
iscolumn is a built-in method % Shadowed string method
iscolumn is a built-in method % Shadowed connector.internal.LoggerLevel method
iscolumn is a built-in method % Shadowed matlab.unittest.Verbosity method
iscolumn is a built-in method % Shadowed matlab.lang.OnOffSwitchState method
/MATLAB/toolbox/matlab/datatypes/categorical/@categorical/iscolumn.m % Shadowed categorical method
/MATLAB/toolbox/matlab/bigdata/@tall/iscolumn.m % Shadowed tall method
/MATLAB/toolbox/parallel/parallel/@distributed/iscolumn.m % Shadowed distributed method
Till Langhammer
on 9 Dec 2019
0 votes
Categories
Find more on Logical 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!