On Startup: function name warning

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

Adam
Adam on 5 Dec 2019
Edited: Adam on 5 Dec 2019
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.
Adam Danz
Adam Danz on 5 Dec 2019
Edited: Adam Danz on 5 Dec 2019
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.
hey guys!
thanks for the quick answer. The installation is from my predecessor...right now i am only using the CONN toolbox which is very well validated. How do I find out which toolbox is crashing? can i somehow delete all toolboxes? so i could delete all and then install only those i need again...
greetings
Till
Stephen23
Stephen23 on 6 Dec 2019
Edited: Stephen23 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.
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.
Stephen23
Stephen23 on 6 Dec 2019
Edited: Stephen23 on 6 Dec 2019
"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:
People I love you. In the end I set the Path to default and added the toolboxes again. Now all my problems are gone. So I guess the one who used my computer before added some folders of SPM which shouldn't be added. The "mother"-folder is enough. And now my second toolbox CONN is working well, so the errors were bound together.
Thanks for the help!!!!
Adam Danz
Adam Danz on 6 Dec 2019
Edited: Adam Danz on 6 Dec 2019
oops.... thanks, Stephen.

Sign in to comment.

Answers (2)

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

as you can see here spm seems to be involved. probably one of the most used toolboxes in the world`?? :-D
I am mainly trying to figure this out because i have some small problems with the CONN toolbox which can stand alone but originally is a sub toolbox of spm...
so i guess i will try to delete and reinstall spm and conn and see if i am happy then??
>> which iscolumn -all
D:\spm12\external\fieldtrip\compat\matlablt2010b\iscolumn.m
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@cell\iscolumn) % cell method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@char\iscolumn) % char method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@double\iscolumn) % double method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int16\iscolumn) % int16 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int32\iscolumn) % int32 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int64\iscolumn) % int64 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int8\iscolumn) % int8 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@logical\iscolumn) % logical method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@single\iscolumn) % single method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@struct\iscolumn) % struct method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint16\iscolumn) % uint16 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint32\iscolumn) % uint32 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint64\iscolumn) % uint64 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint8\iscolumn) % uint8 method
iscolumn is a built-in method % string method
iscolumn is a built-in method % connector.internal.LoggerLevel method
C:\Program Files\MATLAB\R2019b\toolbox\matlab\datatypes\categorical\@categorical\iscolumn.m % categorical method
C:\Program Files\MATLAB\R2019b\toolbox\matlab\bigdata\@tall\iscolumn.m % tall method
C:\Program Files\MATLAB\R2019b\toolbox\parallel\parallel\@distributed\iscolumn.m % distributed method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\iscolumn) % Shadowed
>> which ismatrix -all
D:\spm12\external\fieldtrip\compat\matlablt2010b\ismatrix.m
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@cell\ismatrix) % cell method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@char\ismatrix) % char method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@double\ismatrix) % double method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int16\ismatrix) % int16 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int32\ismatrix) % int32 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int64\ismatrix) % int64 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@int8\ismatrix) % int8 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@logical\ismatrix) % logical method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@single\ismatrix) % single method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@struct\ismatrix) % struct method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint16\ismatrix) % uint16 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint32\ismatrix) % uint32 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint64\ismatrix) % uint64 method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\@uint8\ismatrix) % uint8 method
ismatrix is a built-in method % string method
ismatrix is a built-in method % connector.internal.LoggerLevel method
C:\Program Files\MATLAB\R2019b\toolbox\matlab\datatypes\categorical\@categorical\ismatrix.m % categorical method
C:\Program Files\MATLAB\R2019b\toolbox\matlab\bigdata\@tall\ismatrix.m % tall method
C:\Program Files\MATLAB\R2019b\toolbox\parallel\parallel\@distributed\ismatrix.m % distributed method
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\elmat\ismatrix)
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

Sign in to comment.

Problem solved. Thanks for the help!!!

Asked:

on 5 Dec 2019

Answered:

on 9 Dec 2019

Community Treasure Hunt

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

Start Hunting!