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

 
 

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

Submitted by:  Thomas Weber <tweber>
Submitted on:  Sat 14 Dec 2013 01:06:56 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.4Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 29 Jan 2014 05:57:38 PM UTC, comment #3:

Fixed with http://sourceforge.net/p/octave/code/12532/ for 1.2.4

Andreas Weber <andy1978>
Project 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 File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by asnelt (Posted a comment)
  • -unavailable- added by colbec (Posted a comment)
  • -unavailable- added by tweber (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 27 Aug 2014 06:04:35 AM UTCmtmillerDependencies-=>bugs #43086 is dependent
    Mon 05 May 2014 03:20:51 PM UTCjordighDependencies-=>bugs #42300 is dependent
    Wed 29 Jan 2014 06:07:24 PM UTCcarandraugOpen/ClosedOpen=>Closed
    Wed 29 Jan 2014 05:57:38 PM UTCandy1978StatusNone=>Fixed
    Sat 14 Dec 2013 01:06:56 AM UTCtweberAttached File-=>Added princomp.diff, #29915

    Back to the top


    Powered by Savane 3.1-cleanup1