For my case, it is 'user error'. I do have a dup file name. When I started to remove each file one by one out of my current directory yesterday, I didn't restart Matlab after I removed them so Matlab still thought I had conflicting file in the directory. 'functest.m' was created and ran successfully after I kept only 'funcone.m'.
Given the huge amount of views on this post, it will be really helpful even if Mathwork can do a proper error message with conflicting file names as part of the output. Thank you.
"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <firstname.lastname@example.org>... > > "Yilin " <email@example.com> wrote in message > news:firstname.lastname@example.org... > > Hi everyone. I'm having a similar issue and I don't have duplicated > > function name in my working directory. There are only have two > > self-created functions 'functest' and 'funcone'. 'functest' is created > > after I started my current matlab. 'funcone' is created from last time. > > However, 'funcone' is not running. 'functest' is fine. I have tried > > reinstall matlab. The problem still exists. Do I have to create a new > > function every time ?? Any help is much appreciated. > > EDU>> pwd > > ans = > > C:\Users\DESKTOP\Documents\MATLAB > > > > EDU>> dir > > . .. funcone.m functest.m > > EDU>> which -all funcone > > C:\Users\DESKTOP\Documents\MATLAB\funcone.m > > > > EDU>> funcone(1) > > Undefined function 'funcone' for input arguments of type 'double'. > > Show the group the contents of funcone.m. Is it a function file, a script > file, a class file, or not a MATLAB program file at all? [Just because it > has the extension doesn't mean it's guaranteed to be a MATLAB program file.] > > -- > Steve Lord > email@example.com > To contact Technical Support use the Contact Us link on > http://www.mathworks.com