bugGNU Octave - Bugs: bug #40736, prctile default dimension...

 
 

bug #40736: prctile default dimension different from octave

Submitted by:  None
Submitted on:  Thu 28 Nov 2013 02:25:46 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: MarcOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 03 Jan 2014 08:00:05 PM UTC, comment #2:

I think Matlab behavior, that Octave was chasing, was different in the past. In any case, it now seems that Matlab just uses the first non-singleton dimension if none is specified. I made that change to prctile.m and quantile.m in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/b29beed0e98d). To see the change you will need to build from the development sources available from Mercurial (or just grab the files prctile.m and quantile.m). The change will eventually be released as a part of Octave 4.2.0.

Rik <rik5>
Project Administrator
Fri 29 Nov 2013 01:08:02 PM UTC, comment #1:

Confirmed this behavior on the development branch, but I can't say whether this is an Octave bug or a Matlab bug. It looks like a Matlab bug to me, or at least a feature that doesn't match their documentation. Can someone confirm what the behavior is in the most recent version of Matlab?

According to Matlab help, the third argument "dim" should be set to 2 in this case if you intended to calculate percentiles along the rows instead of the columns.

The same behavior holds for quantile, which prctile calls to compute the results. So this call also fails the same way:

If the matrix is transposed you get the answer you wanted.

or if you specify the third argument to compute along the rows.

Mike Miller <mtmiller>
Project Administrator
Thu 28 Nov 2013 02:25:46 PM UTC, original submission:

The following command results in different behaviour in Matlab 2008b and in Octave 3.6.4

prctile(1:10,[0 50 100])

OCTAVE

MATLAB

Anonymous

 

(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 mtmiller (Posted a comment)
  • -unavailable- added by None (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Jan 2014 08:00:05 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Fri 29 Nov 2013 01:08:02 PM UTCmtmillerStatusNone=>Need Info
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1