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

 
 

bug #32961: cor.m fails with 1 argument

Submitted by:  Michael Creel <mcreel>
Submitted on:  Thu 31 Mar 2011 10:02:52 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Michael CreelOpen/Closed: Closed
Release: 3.4.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 31 Mar 2011 04:41:06 PM UTC, comment #1:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/422a7a7e9b6e)

Rik <rik5>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 31 Mar 2011 04:41:06 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 31 Mar 2011 10:02:52 AM UTCmcreelCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1