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

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

[Octave-bug-tracker] [bug #53817] nonlin_residmin() fails at call to svd


From: Georg Wiora
Subject: [Octave-bug-tracker] [bug #53817] nonlin_residmin() fails at call to svd()
Date: Thu, 3 May 2018 03:48:40 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0

URL:
  <http://savannah.gnu.org/bugs/?53817>

                 Summary: nonlin_residmin() fails at call to svd()
                 Project: GNU Octave
            Submitted by: gwiora
            Submitted on: Thu 03 May 2018 09:48:38 AM CEST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: gwiora
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Since octave 4.4.0 nonlin_residmin() from package optim fails in my
application at a call svd() function in octave core. In octave 4.2.2 this
function was working perfectly.

Because package optim has not changed in the new release, it is very likely
that svd() is producing different results now.


More precisely the error happens in file __lm_svd__ at line 230
...\share\octave\packages\optim-1.5.2\private\__lm_svd__.m :


 tp1 = (v * (g .* ser)) .* nrm;

error: __lm_svd__: operator *: nonconformant arguments (op1 is 9x9, op2 is
4x1)
error: called from
    __lm_svd__ at line 230 column 11
    __nonlin_residmin__ at line 1128 column 21
    nonlin_residmin at line 98 column 21
    MyOptimizeFunction at ...


I have compared the results of two runs in 4.2.2 and 4.4.0 and found a
difference in the return values of svd at __lm_svd__ line  205 at the
following call:

[prt,s,v]=svd(prt,0);



Version 4.4.0 returns the wrong matrix size (non square) for result s (second
result) and v (third result):

s =
Diagonal Matrix

  2.0000e+000            0            0            0            0            0
           0            0            0
            0  1.6727e-003            0            0            0            0
           0            0            0
            0            0  3.4258e-004            0            0            0
           0            0            0
            0            0            0  1.3400e-017            0            0
           0            0            0

v =
  -0.50000   0.49646  -0.16368   0.69046   0.00000   0.00000   0.00000  
0.00000   0.00000
  -0.50000   0.50352   0.16595  -0.68478   0.00000   0.00000   0.00000  
0.00000   0.00000
  -0.50000  -0.50249   0.68649   0.16196   0.00000   0.00000   0.00000  
0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000  
0.00000  -1.00000
   0.00000   0.00000   0.00000   0.00000   1.00000   0.00000   0.00000  
0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   1.00000   0.00000  
0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   1.00000  
0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000  
1.00000   0.00000
  -0.50000  -0.49749  -0.68877  -0.16764   0.00000   0.00000   0.00000  
0.00000   0.00000


Version 4.4.0 returns:

s =
Diagonal Matrix

  2.0000e+000            0            0            0
            0  1.6727e-003            0            0
            0            0  3.4258e-004            0
            0            0            0  1.3400e-017

v =
  -0.50000   0.49646  -0.16368   0.69046
  -0.50000   0.50352   0.16595  -0.68478
  -0.50000  -0.50249   0.68649   0.16196
   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000
  -0.50000  -0.49749  -0.68877  -0.16764


As you see the numbers are correct, but the matrices have extra columns.

I will implement a fix in my copy of "__lm_svd__.m" and see if it works then.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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