[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40736] prctile default dimension different fr
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #40736] prctile default dimension different from octave |
Date: |
Fri, 29 Nov 2013 13:08:02 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 |
Update of bug #40736 (project octave):
Status: None => Need Info
Operating System: GNU/Linux => Any
_______________________________________________________
Follow-up 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:
octave:19> quantile ([1:10], [0 .5 1])
ans =
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
If the matrix is transposed you get the answer you wanted.
octave:20> quantile ([1:10]', [0 .5 1])
ans =
1.0000
5.5000
10.0000
or if you specify the third argument to compute along the rows.
octave:22> quantile ([1:10], [0 .5 1], 2)
ans =
1.0000 5.5000 10.0000
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40736>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/