octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57199] [octave-forge] (optim) lsqnonlin in ve


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #57199] [octave-forge] (optim) lsqnonlin in version 1.6.0 fails with Octave 6.0
Date: Sun, 7 Jun 2020 07:12:21 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #8, bug #57199 (project octave):

The underlying problem could be triggered so:

octave:9> fieldname = "a";
octave:10> structure = struct (fieldname, 1);
octave:11> anonfunc = @ () structure.(fieldname);
octave:12> anonfunc ()
error: 'fieldname' undefined near line 1, column 1
error: called from
    @<anonymous> at line 1 column 18
octave:13> 

This is now filed as bug #58519.

> The lsqnonlin error in Dev Octave is due to Octave becoming
> more restrictive in parsing anonymous functions
> (cf. bug #57255 and bug #57392). 

There was no assignment, but rather a non-preserved variable, so I don't see a
relation with the fix resulting from bug #57255.

> One way to fix it is to wrap the anonymous function code in
> eval to do the parsing.

This workaround would be rather intrusive, and I don't see why it works and so
can't see under which conditions it would work. So I wouldn't apply it, but
rather wait for a fix or explanation of the newly filed bug #58519.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57199>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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