bugGNU Octave - Bugs: bug #32961, cor.m fails with 1 argument

 
 

bug #32961: cor.m fails with 1 argument

Submitter:  Michael Creel <mcreel>
Submitted:  Thu 31 Mar 2011 10:02:52 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Michael Creel Open/Closed:  * Closed
Release:  * 3.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 31 Mar 2011 04:41:06 PM UTC, comment #1: 
Rik <rik5>
Group administrator
Thu 31 Mar 2011 10:02:52 AM UTC, original submission:  

On ver 3.4.0, cor fails with 1 argument. corrfcoef works properly. I believe this also affects the devel sources based on inspection, but I have not checked with a compiled version.

Code that shows the problem:
octave:1> a = rand(10,2);
octave:2> cor(a)
error: cov: X and Y must have the same number of observations


A possible fix: in cor.m, change

function retval = cor (x, y = [])

to

function retval = cor (x, y = x)


Michael Creel <mcreel>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-31 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2011-03-31 mcreel Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code