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: Nir Krakauer
Subject: [Octave-bug-tracker] [bug #57199] [octave-forge] (optim) lsqnonlin in version 1.6.0 fails with Octave 6.0
Date: Tue, 28 Jan 2020 17:19:11 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

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

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

One way to fix it is to wrap the anonymous function code in eval to do the
parsing. This entails replacing lines 119-131 of __jacobian_constants__.m 
with


eval (['f.(fname) = @ (p, varargin) f.' fname ' (p, varargin{1:end-1},
cell2fields ({v_opts{:}, o.plabels, assign(o.jac_fixed, o.nonfixed,
varargin{end}.fixed), o.cstep, o.parallel_local,  o.parallel_net, true},
{names_j{:}, "plabels", "fixed", "h", "parallel_local", "parallel_net",
"__check_first_call__"}, 2, varargin{end}));'])


This lets the example and tests run correctly. I don't know if there's a
better way.

    _______________________________________________________

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]