Error Matlab 2022 and 2023 : Undefined function 'find' for input arguments of type 'pattern'

Hello,
I found this kind of error recently on my matlab 2022a, 2022b, and even 2023 : Undefined function 'find' for input arguments of type 'pattern'. Before (1-2 months ago) they worked fine. Anyone know this issue?

5 Kommentare

What does the command below return?

which find -all
>> which find -all
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\find)
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@char\find) % char method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@double\find) % double method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@int16\find) % int16 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@int32\find) % int32 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@int64\find) % int64 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@int8\find) % int8 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@logical\find) % logical method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@single\find) % single method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@uint16\find) % uint16 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@uint32\find) % uint32 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@uint64\find) % uint64 method
built-in (C:\Program Files\MATLAB\R2022a\toolbox\matlab\elmat\@uint8\find) % uint8 method
C:\Program Files\MATLAB\R2022a\toolbox\matlab\codetools\@mtree\find.m % mtree method
find is a built-in method % connector.internal.LoggerLevel method
find is a built-in method % schema.package method
find is a built-in method % schema.class method
find is a built-in method % handle.handle method
find is a built-in method % ReqMgr.LinkType method
find is a built-in method % schema.prop method
find is a built-in method % handle.subreference__ method
find is a built-in method % schema.method method
C:\Program Files\MATLAB\R2022a\toolbox\matlab\bigdata\@tall\find.m % tall method
C:\Program Files\MATLAB\R2022a\toolbox\mbc\mbcdata\@cgprojconnections\find.m % cgprojconnections method
C:\Program Files\MATLAB\R2022a\toolbox\mbc\mbcdesign\@coninputfactor\find.m % coninputfactor method
C:\Program Files\MATLAB\R2022a\toolbox\mbc\mbctools\@sweepset\find.m % sweepset method
C:\Program Files\MATLAB\R2022a\toolbox\mbc\mbctools\@sweepsetfilter\find.m % sweepsetfilter method
C:\Program Files\MATLAB\R2022a\toolbox\mbc\mbcview\@cgddnode\find.m % cgddnode method
C:\Program Files\MATLAB\R2022a\toolbox\parallel\gpu\@gpuArray\find.m % gpuArray method
C:\Program Files\MATLAB\R2022a\toolbox\parallel\parallel\@codistributed\find.m % codistributed method
>>
anyway, thank you Rik for the response
Please copy and paste the whole error message i.e. all of the red text.
Also, post the code where you use the function find() and it gives the error.
FYI, 2 months ago there was no problem. I don't think it's my script failure. Now, even I can't add any single component (axes, button etc) in app designer, and got this message:

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Adi Purwandana
Adi Purwandana am 17 Jul. 2023
Verschoben: Rik am 17 Jul. 2023
Hello everyone,
I thought my problem is solved after following the answer by Prashanth Soundararajan on this thread:
It's simply related to path issues, so it's simply solved by:
Try restoring the default path by typing the following in the MATLAB Command Window:
>>restoredefaultpath
>>rehash toolboxcache
>>savepath

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by