cwipf / SimulinkNb

NoiseBudget toolbox for Simulink
3 stars 5 forks source link

GWData may clear global variables #20

Closed cwipf closed 9 years ago

cwipf commented 9 years ago

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:

  1. don't call javaaddpath() in GWData; just make the user edit the path manually
  2. save/restore global variables when calling javaaddpath()
  3. don't store the functionCache in a global variable; e.g. use setappdata() instead