Below is a copy/paste of a sequence of commands that I executed at the command line in R2015a and its output. Here GeoCalCho and TrajClass are both value classes that I have defined and GeoCalCho.split() is a static method of the GeoCalCho class. It is supposed to take a TrajClass object, th, as input and return two TrajClass objects, thu and thl, as output.
>> clear GeoCalCho
>> [thu,thl]=GeoCalCho.split(th)
Undefined variable "GeoCalCho" or class "GeoCalCho.split".
>> GeoCalCho
Error using GeoCalCho (line 31)
Not enough input arguments.
>> [thu,thl]=GeoCalCho.split(th)
thu =
TrajClass with properties:
data: [2x8x558 double]
coordsys: 'ij'
thl =
TrajClass with properties:
data: [2x8x558 double]
coordsys: 'ij'
So why doesn't MATLAB recognize GeoCalCho as a static method, initially? Clearly it is not a path problem. When I called the GeoCalCho class constructor, MATLAB finds it successfully. Moreover, MATLAB is thereafter able to find GeoCalCho.split(), although I haven't done anything to the path.
This is just an example. I have seen the same kind of behavior with other classes, though regrettably, I haven't found a way to reproduce it reliably. Has anyone else noticed this?