I created a class called MyClass, which is stored in a file as follows:
..\@MyClass\MyClass.m
Then I create a function called myfunction.m and store the file in the folder @MyClass. When I execute the following:
myObj = MyClassmyfunction(myObj)
I get the following error:
Undefined function or method 'myfunction' for input arguments of type 'MyClass'.
I need to restart MATLAB for the function call to work properly. I would like for MATLAB to be automatically able to detect the new functions.
Best Answer