bugGNU Octave - Bugs: bug #33542, corr only works on 2-D arrays

 
 

bug #33542: corr only works on 2-D arrays

Submitted by:  Arnaud Delorme <arnodelorme>
Submitted on:  Sat 11 Jun 2011 03:50:48 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 10 Feb 2016 10:05:00 PM UTC, comment #9:

Marking as "Won't Fix" and closing report.

Rik <rik5>
Project Administrator
Wed 10 Feb 2016 03:48:55 AM UTC, comment #8:

Rik, thanks for checking. Matlab now also fails on matrices greater than two dimensions. (I mistakenly said "more than three" last time.)

This is no longer a compatibility issue. I'll mark it as a feature request, but think it should be closed -- Matlab moved away from providing that feature.

Lachlan Andrew <lachlan>
Project Member
Thu 08 Oct 2015 12:35:14 AM UTC, comment #7:

I think this Matlab compatibility request is still present. If I try the code from comment #4 in Octave dev (2015/10/07) I get

Rik <rik5>
Project Administrator
Thu 17 Sep 2015 09:27:27 AM UTC, comment #6:

I believe corrcoef has been removed from Octave 4.0.0.

Also, corr produces an error in both Matlab and Octave for arrays of more than 3 dimensions, and corrcoef does in Matlab.

Can this bug be closed now?

Lachlan Andrew <lachlan>
Project Member
Sun 28 Jul 2013 03:44:55 PM UTC, comment #5:

If I understand correctly where this left off, this is still a bug in the development version.

Mike Miller <mtmiller>
Project Administrator
Sun 17 Jul 2011 04:10:54 AM UTC, comment #4:

Rik,

This looks like what you want:

>> corr (rand(2,2,3), rand(2,2,3))


ans =

-1.0000 -1.0000
-1.0000 -1.0000
1.0000 1.0000
-1.0000 -1.0000
-1.0000 -1.0000
-1.0000 -1.0000

>>

Michael Godfrey <godfrey>
Project Member
Sun 17 Jul 2011 03:46:54 AM UTC, comment #3:

If corr only works on 2-D arrays then I think our current implementation is fine and I can close this report.

Perhaps, one could try

which would at least show if the NaN output in the previous example was caused by not having a true matrix in the first two dimensions.

Rik <rik5>
Project Administrator
Sun 17 Jul 2011 03:14:55 AM UTC, comment #2:

>> corr (rand(1,1,10), rand(1,1,10))


ans =

NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN

>>

As usual, this is Matlab r2009b. I tried a few other things
with corr(), but I need to reread its Matlab decription...

Michael Godfrey <godfrey>
Project Member
Sun 17 Jul 2011 02:05:56 AM UTC, comment #1:

Since the function corrcoef in Octave is more equivalent to the function corr() in Matlab, could you report whether the following code produces an error?

Rik <rik5>
Project Administrator
Sat 11 Jun 2011 03:50:48 PM UTC, original submission:

corrcoef(rand(1,1,10), rand(1,1,10)) 
% crashes under Octave but works in Matlab

Arnaud Delorme <arnodelorme>

 

(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 lachlan (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by arnodelorme (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Feb 2016 10:05:00 PM UTCrik5StatusConfirmed=>Wont Fix
      Open/ClosedOpen=>Closed
    Wed 10 Feb 2016 03:48:55 AM UTClachlanItem GroupMatlab Compatibility=>Feature Request
    Sun 28 Jul 2013 03:44:55 PM UTCmtmillerCategoryNone=>Octave Function
      Item GroupNone=>Matlab Compatibility
      Release3.4.0=>dev
      Operating SystemMac OS=>Any
    Wed 27 Jul 2011 04:41:35 PM UTCrik5StatusNone=>Confirmed
      Summarycorrcoef Matlab compatibility issue (multi-dim matrices)=>corr only works on 2-D arrays

    Back to the top


    Powered by Savane 3.1-cleanup1