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

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

[Octave-bug-tracker] [bug #61801] lsqnonlin from optim package doesn't w


From: anonymous
Subject: [Octave-bug-tracker] [bug #61801] lsqnonlin from optim package doesn't work under Octave 7.0.90
Date: Wed, 12 Jan 2022 06:07:48 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

URL:
  <https://savannah.gnu.org/bugs/?61801>

                 Summary: lsqnonlin from optim package doesn't work under
Octave 7.0.90
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 12 Jan 2022 11:07:46 AM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: MSpo
        Originator Email: gestatten.meissner@gmail.com
             Open/Closed: Open
                 Release: 7.0.90
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

This minimal example works under Octave 6.4.0 but throws an error in Octave
7.0.90 (plus, there are a couple of warnings when loading the optim package):


pkg load optim

x = (0:0.01:10).';
y = @(p) p(1) + p(2)*sin(2*pi*p(3)*x);

p0 = [0.3 0.5 0.2];
y0 = y([0.37 0.63 0.21]) + (rand(size(x))-0.5);

p_fit = lsqnonlin(@(p) y(p) - y0,p0);
plot(x,[y0,y(p_fit)])


I get this error:


error: : function called with too many inputs
error: called from
    @<anonymous>
    __dfdp__ at line 304 column 15
    __nonlin_residmin__>@<anonymous> at line 329 column 26
    __jacobian_constants__>@<anonymous> at line 121 column 11
    __lm_svd__ at line 196 column 9
    __nonlin_residmin__ at line 452 column 25
    nonlin_residmin at line 98 column 25
    lsqnonlin at line 264 column 21
    optim_bug at line 9 column 7


It seems to boil down to line 316 in \_\_nonlin_residmin\_\_


f.f = @ (varargin) f.f (varargin{:}) - obs;


which doesn’t seem to be allowed anymore.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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