bugGNU Octave - Bugs: bug #38585, jacobs(x,f) in optim fails on...

 
 

bug #38585: jacobs(x,f) in optim fails on n>2 functions

Submitted by:  None
Submitted on:  Mon 25 Mar 2013 08:11:01 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: NoneAssigned to: None
Originator Name: Hershal BhaveOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.3
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 14 May 2013 06:01:23 AM UTC, comment #3:

Could someone please close this bug?

Olaf

Olaf Till <i7tiol>
Mon 08 Apr 2013 06:42:47 PM UTC, comment #2:

> BTW, use .' for simple transposing.


This doesn't make a difference here, since idx is the output of find(). I think using ' instead of .' is better in this instance, easier to understand, or at least to me it is.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Mon 08 Apr 2013 11:57:57 AM UTC, comment #1:

I applied the fix, it will be in the next release. Thank you.

BTW, use .' for simple transposing.

Olaf Till <i7tiol>
Mon 25 Mar 2013 08:11:01 AM UTC, original submission:

Hello,

I'm having an issue with jacobs(x,f) in the optim package. The jacobs(x,f) method fails to generate the Jacobian for functions larger than n=2. I can reproduce this behavior by going through one of the examples in my Numerical Analysis 9th Edition Textbook by Burden and Faires (page 651):

jacobs(x,f) gives the following error message:

This is due specifically to these lines:

I was able to copy the relevant portions of the code and by replacing "idx(2:end)" with "idx(2:end)'" (I added the Transpose symbol), the correct result was achieved and verified by the example in the book, where "jac(x,f)" is the modified "jacobs(x,f)" method:
octave:23> jac(x,f)
ans =

3.0000e+00 9.9998e-04 -9.9998e-04
2.0000e-01 -3.2400e+01 9.9500e-01
-9.9005e-02 -9.9005e-02 2.0000e+01

I looked into the latest version of the optim package (1.2.2) on this site as well as the one residing in the Arch Linux AUR (1.2.2-1) and was able to reproduce the same bug (the jacobs.m files are exactly the same). The version of Octave in the Arch Linux "extra" repository is marked "out-of-date" (3.6.3-2), so I'm not sure if this is the cause of the error or not, but I think it should be looked into further. Forgive me if the patch file is not correct, I'm pretty new to open-source contributing.

Thank you for your time.

- Hershal

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27673:  jacobs.m.patch added by None (298B - text/x-patch - Patchfile for jacobs.m)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cdf (Updated the item)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by i7tiol (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 14 May 2013 06:17:41 AM UTCcdfOpen/ClosedOpen=>Closed
    Mon 25 Mar 2013 08:11:01 AM UTCNoneAttached File-=>Added jacobs.m.patch, #27673

    Back to the top


    Powered by Savane 3.1-cleanup