octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #32961] cor.m fails with 1 argument


From: Michael Creel
Subject: [Octave-bug-tracker] [bug #32961] cor.m fails with 1 argument
Date: Thu, 31 Mar 2011 10:02:53 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

URL:
  <http://savannah.gnu.org/bugs/?32961>

                 Summary: cor.m fails with 1 argument
                 Project: GNU Octave
            Submitted by: mcreel
            Submitted on: Thu 31 Mar 2011 10:02:52 AM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Michael Creel
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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)






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32961>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]