bugGNU Octave - Bugs: bug #39002, optim: leasqr documentation...

 
 

bug #39002: optim: leasqr documentation incorrect

Submitter:  None
Submitted:  Wed 15 May 2013 06:36:05 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Laurie Aldridge Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 26 Oct 2013 09:15:22 AM UTC, comment #2: 

There are two issues here:

1. the warnings when running demo1 which I can't replicate and am assuming come from running an old version of Octave or optim package;
2. the error from demo2 which happens from running it after demo1 without clearing the variables in memory (running here means copying and paste the demo code that is show in the online documentation). In demo1, the variable "options" is an array while on demo2 is a struct. The error occurs when trying to create the struct with "options.inequc = {A, B}". Anyway, this is invalid since they are two different examples. Run "clear all" in between them.

Carnë Draug <carandraug>
Group Member
Sat 18 May 2013 08:58:22 AM UTC, comment #1: 

For me both demos work fine and without warnings. I have optim version 1.2.2. The line numbers in your warnings below do not point to interesting lines in leasqr.m of that version. Which version of optim do you have? Please upgrade to the latest version if you do not have it already.

> pkg describe optim


You converted the demos to scripts. Demo1 creates an array 'options' and Demo2 creates a struct 'options'. When you run Demo2 it fails because you already have an 'options' variable with incompatible in your workspace. Use this instead:

> demo('leasqr', 1)
> demo('leasqr', 2)

Clemens Buchacher <drizzd>
Wed 15 May 2013 06:36:05 PM UTC, original submission:  

In http://octave.sourceforge.net/optim/function/leasqr.html there are two demonstrations - I converted these to two files demo1.m and demo2.m. Demo1.m appears to work with some warning messages. Demo2.m crashes with an error message

Demo1
warning: C:\Zoom\Sources\OCTAVE\NLS\leasqr.m: possible Matlab-style short-circuit operator at line 229, column 17
warning: C:\Zoom\Sources\OCTAVE\NLS\leasqr.m: possible Matlab-style short-circuit operator at line 259, column 27
warning: C:\Zoom\Sources\OCTAVE\NLS\leasqr.m: possible Matlab-style short-circuit operator at line 345, column 14
Parameter changes converged to specified precision
warning: corrcoef is not equivalent to Matlab and will be removed from a future version of Octave; for similar functionality see corr

Demo2
error: invalid assignment to cs-list outside multiple assignment
error: called from:
error:   C:\Zoom\Sources\OCTAVE\NLS\Demo2.m at line 18, column 16


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28090:  Demo1.m added by None (1KiB - application/octet-stream - This is my first bug report and I may be wasting someones time I thought that it was worthwhile pointing out flaws in GREAT documentation. I am really puzzled as I have installed packages but not loaded them)
file #28091:  Demo2.m added by None (798B - application/octet-stream - This is my first bug report and I may be wasting someones time I thought that it was worthwhile pointing out flaws in GREAT documentation. I am really puzzled as I have installed packages but not loaded them)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by drizzd (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-26 carandraug StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
        Summaryleasqr documentation incorrect optim: leasqr documentation incorrect
    2013-05-15 None Attached File- Added Demo1.m, #28090
        Attached File- Added Demo2.m, #28091

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code