bugGNU Octave - Bugs: bug #40893, princomp fails when called with...

 
 

bug #40893: princomp fails when called with only one argument

Submitter:  Thomas Weber <tweber>
Submitted:  Sat 14 Dec 2013 01:06:56 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.4 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 29 Jan 2014 05:57:38 PM UTC, comment #3: 
Andreas Weber <andy1978>
Group Member
Tue 28 Jan 2014 10:39:18 PM UTC, comment #2: 

I applied the patch. princomp will be fixed in release 1.2.4.

Thanks,
Arno

Arno Onken <asnelt>
Mon 30 Dec 2013 11:34:19 AM UTC, comment #1: 

Same thing on openSUSE 13.1 Octave 3.8 GUI
princomp(rand(10,2)) % fails
[a b]=princomp(rand(10,2)) % works.

Colin Beckingham <colbec>
Sat 14 Dec 2013 01:06:56 AM UTC, original submission:  

This is Debian bug 731992, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731992, reported by Kacper Gutowski which I am forwarding here.

===============================
hyper% octave -q --no-init-file
warning: function /usr/share/octave/packages/statistics-1.2.2/fstat.m shadows a core library function
octave:1> princomp(rand(10,2))
error: 'r' undefined near line 103 column 48
error: invalid limit value in colon expression
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/packages/statistics-1.2.2/princomp.m at line 103, column 9
octave:1>

As far as I can tell this is a trivial bug caused by the fact that 'r' is only calculated if nargout > 1 and not needed otherwise so it can be fixed with the simple patch attached.
===============================

Patch from submitter attached

Thomas Weber <tweber>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29915:  princomp.diff added by tweber (617B - text/x-patch)

 

Carbon-Copy List
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by asnelt (Posted a comment)
  • -email is unavailable- added by colbec (Posted a comment)
  • -email is unavailable- added by tweber (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
    2014-08-27 mtmiller Dependencies- bugs #43086 is dependent
    2014-05-05 jordigh Dependencies- bugs #42300 is dependent
    2014-01-29 carandraug Open/ClosedOpen Closed
    2014-01-29 andy1978 StatusNone Fixed
    2013-12-14 tweber Attached File- Added princomp.diff, #29915

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code