G.. wrote:
> 
> In matlab, prctile(x, p) returns the same kind of vector as p (row or
> column), whereas octave always returns a column vector. I think matlab's
> behavior is more logical.
> 
> G.
> 


This is not the only problem in the compatibility of prctile.. Consider the
comment in prctile that says

## The first and last values are pegged at 0 percent and 100 percent
## respectively, and the rest of the values are uniformly spaced between
## them, with linear interpolation between the points.  This is
## consistent with the definition of quantile given in the R statistics
## package, but inconsistent with that of the statistics toolbox from
## Matlab.

I believe the R definition is the better one to use. Also the current
version doesn't treat the third dim argument, allowing ND arrays to be
handled. Ok, I left the R definition in place, but added the dim argument
and have the output for a vector value of X be the same shape as p. Changed
committed to the octave-forge SVN.

D.

-- 
View this message in context: 
http://www.nabble.com/prctile%28x%2C--a-b-%29-returns-column-instead-of-row-vector-tp16423111p16432019.html
Sent from the octave-dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to