Mon 01 Nov 2010 08:20:27 AM UTC, comment #3:
Rik has closed the bug due to Pascals comment.
Pascals comment says the the code is not valid for Matlab. This is probably not true.
1. I don't understand what caused the error-message seen by Pascal with Matlab 2009a. Anyway, the error-message was seen by running in Matlab the workaround for the bug, not the code that triggered the bug in Octave.
2. I have tested that the code triggering the bug in Octave is valid input for Matlab 2009b with the following:
in the current directory, there is the file "private_test.m":
function private_test ()
f = @ () test_private ();
f ();
and in the subdirectory "private" of the current directory there is the file "test_private.m":
function test_private ()
1;
Running
>> private_test ();
from Matlabs command prompt gives no error-messages (and returns to the command prompt without output, as expected). (In Octave, this procedure had triggered the bug.)
BTW even the originally posted workaround works with Matlab-2009b without error messages for me, provided that the variable name for the anonymous function is changed since Matlab does not seem to allow using a name for this which previously named a function (Pascal had done this, I can not see where his error-message came from).
The bug seems to show that Octaves anonymous functions do not preserve enough context to see functions in private directories. This might be important to note, even if the bug should not be fixed immediately.
|