File Exchange

image thumbnail

Sort Vectors Into Fractiles

version (1013 Bytes) by Wei Li
Sort vectors into fractiles.

1 Download

Updated 02 Feb 2004

No License

% y=fractile(x,f,0);
% PURPOSE: Sort and devide a column vector x into fractiles
% USAGE: y=fractile(x,f,ascending);
% where: y = a cell array structure containing output fractiles and their index numbers
% x = the input vector
% f = the number of fractiles to be devided into
% ascending = 1 or 0, the logical switch that specifies
% an ascending sort (0) or a descending sort (1)

Cite As

Wei Li (2021). Sort Vectors Into Fractiles (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Lukas Brockmann


Very useful, thanks!

Dan Zhang

Very useful indeed!

Will Petro

It works on my machine. The doubles are the vector cut into minor fractiles

Nina Chen

The function doesn't work! I put in a vector and y = fractile(vector, 5, 1), it gives results like
[2x2 double] [2x2 double] [2x2 double] [2x2 double] [2x2 double]

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!