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

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

[Octave-bug-tracker] [bug #54577] optim: error when requestion Jacobian


From: Ceral Paquet
Subject: [Octave-bug-tracker] [bug #54577] optim: error when requestion Jacobian output
Date: Sun, 26 Aug 2018 16:18:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #1, bug #54577 (project octave):

The error goes away if I specify dummy arguments for UB and LB. i.e. I need to
trigger nargs>=4 in order to get the settings variable initialized.


X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA, JACOBIAN] = lsqnonlin
(@(x)sin(x),5);


Another issue I noticed is the Jacobian does not respect the precision of my
input variable. This is important because the Jacobian is often gigantic and
it helps to use single precision. We don't need to care too much about high
precision since the Jacobian is based on a local linearization approximation
anyway.


>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA, JACOBIAN] = lsqnonlin
(@(x)sin(x),5);
error: 'settings' undefined near line 263 column 63
error: called from
    lsqnonlin at line 263 column 10

>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA, JACOBIAN] = lsqnonlin
(@(x)sin(x),5,[],[]);

>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA, JACOBIAN] = lsqnonlin
(@(x)sin(x),single(5),[],[]);

>> whos
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
        EXITFLAG      1x1                          8  double
        JACOBIAN      1x1                          8  double
        LAMBDA        1x1                         16  struct
        OUTPUT        1x1                          8  struct
        RESIDUAL      1x1                          4  single
        RESNORM       1x1                          4  single
        X             1x1                          4  single

Total is 7 elements using 52 bytes


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54577>

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




reply via email to

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