octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need test run in Matlab


From: Burgers, A.R. (Teun)
Subject: Re: Need test run in Matlab
Date: Sun, 22 Dec 2019 12:47:36 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

Op 19-12-2019 om 16:56 schreef John W. Eaton:
On 12/19/19 2:47 AM, Burgers, A.R. (Teun) wrote:

In that scenario I get this. Also the response after the last f2 command is not immediate, the search for f2 takes some time, probably because of network locations in the path.

 >> cd fh-bug
 >> fh=f1

fh =  function_handle with value:   @gg

 >> fh()
foo-i-hithere: 1
 >> f2
foo-i-hithere: 2
 >> cd ..
 >> clear functions
 >> fh()
foo-i-hithere: 1

OK, so the function is cleared (the persistent variable is reset to the initial value) but it is reloaded from the same location that is no longer in the path.  I should have also asked, after it is reloaded, does inmem show it?

 >> f2
'f2' is not found in the current folder or on the MATLAB path, but exists in:
     C:\tmp\tmp\fh-bug

Change the MATLAB current folder or add its folder to the MATLAB path.

Interesting, so it appears to remember functions (or directories) previously in the search path so that it can issues warnings like that one.

Thanks!

jwe



Here some inmem results:

>> clear all
>> clear all
>> inmem

ans =  7×1 cell array

    {'Manager'       }
    {'Channel'       }
    {'MessageHandler'}
    {'InputStream'   }
    {'OutputStream'  }
    {'FevalService'  }
    {'MatlabService' }

>> cd fh-bug
>> fh=f1

fh =  function_handle with value:   @gg

>> fh()
foo-i-hithere: 1

>> f2
foo-i-hithere: 2

>> inmem

ans = 10×1 cell array

    {'Manager'          }
    {'Channel'          }
    {'MessageHandler'   }
    {'InputStream'      }
    {'OutputStream'     }
    {'FevalService'     }
    {'MatlabService'    }
    {'f1'               }
    {'fh-bug\private\gg'}
    {'f2'               }

>> cd ..
>> clear functions
>> inmem

ans =

  7×1 cell array

    {'Manager'       }
    {'Channel'       }
    {'MessageHandler'}
    {'InputStream'   }
    {'OutputStream'  }
    {'FevalService'  }
    {'MatlabService' }

>> fh()
foo-i-hithere: 1
>> inmem

ans =

  8×1 cell array

    {'Manager'          }
    {'Channel'          }
    {'MessageHandler'   }
    {'InputStream'      }
    {'OutputStream'     }
    {'FevalService'     }
    {'MatlabService'    }
    {'fh-bug\private\gg'}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]