This is the reason for the "cleared variable" errors with functionCache in the DRFPMI noise budget. When nds2-client is not found in the java path, GWData calls javaaddpath(), a function that silently clears global variables and various other aspects of the Matlab environment.
To fix this, we can do one or more of following:
don't call javaaddpath() in GWData; just make the user edit the path manually
save/restore global variables when calling javaaddpath()
don't store the functionCache in a global variable; e.g. use setappdata() instead
This is the reason for the "cleared variable" errors with functionCache in the DRFPMI noise budget. When nds2-client is not found in the java path, GWData calls javaaddpath(), a function that silently clears global variables and various other aspects of the Matlab environment. To fix this, we can do one or more of following: