Warnings in Command Window

15 views (last 30 days)
Stella
Stella on 21 Jul 2022
Commented: Stella on 21 Jul 2022
When I started MATLAB and saw the messages below.
I have tried to uninstall and re-install MATLAB, but those warnings are still here. I'm using a MacBook Pro. I also have a R2020b MATLAB installed in my laptop because I need both versions of MATLAB. I'm not if that's causing the problem.
"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 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.
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 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 isequaln 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 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.
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. "
  2 Comments
Walter Roberson
Walter Roberson on 21 Jul 2022
please show the output of
which -all contains
Stella
Stella on 21 Jul 2022
>> which -all contains
built-in (/Applications/MATLAB_R2022a.app/toolbox/matlab/strfun/contains)
/Users/stella/Documents/MATLAB/Add-Ons/Collections/FieldTrip/compat/octave/contains.m % Shadowed
/Users/stella/Documents/MATLAB/Add-Ons/Collections/FieldTrip/compat/matlablt2016b/contains.m % Shadowed
contains is a built-in method % string method
contains is a Java method % java.util.ArrayList method
contains is a Java method % java.util.AbstractList method
contains is a Java method % java.util.AbstractCollection method
contains is a Java method % java.util.Collection method
contains is a Java method % java.util.List method
contains is a Java method % java.lang.String method
/Applications/MATLAB_R2022a.app/toolbox/matlab/bigdata/@tall/contains.m % tall method

Sign in to comment.

Accepted Answer

Stephen23
Stephen23 on 21 Jul 2022
Edited: Stephen23 on 21 Jul 2022
"I'm not if that's causing the problem."
The problem is that you have added many subfolders to the MATLAB search path, that should not be there.
To fix those warnings, remove all FieldTrip folders from the MATLAB search path, e.g. by calling
restoredefaultpath
Note that the FieldTrip documentation explicitly states "In general you should not add FieldTrip with all subdirectories to your path... there are some functions for backward compatibility in fieldtrip/compat, which should only be added to your path in case you use the corresponding old MATLAB release" and then it procedes to explain exactly which toolbox folder needs to be added to the MATLAB search path. Note: folder, singular, i..e only one folder.
The FieldTrip documentation also explains how to reset the MATLAB search path and start again.
  1 Comment
Stella
Stella on 21 Jul 2022
I followed your directions and the issue has been resolved. Thank you so much.

Sign in to comment.

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!