[Y, E] = discretize (X, n) ¶[Y, E] = discretize (X, edges) ¶[Y, E] = discretize (X, dur) ¶[Y, E] = discretize (…, 'categorical') ¶[Y, E] = discretize (…, 'IncludedEdge', IncludedEdge) ¶Group data into discrete bins or categories.
n is the number of bins to group the values into.
edges is an array of edge values defining the bins.
dur is a duration value indicating the length of time of each
bin.
If 'categorical' is specified, the resulting values are a categorical
array instead of a numeric array of bin indexes.
Returns: Y - the bin index or category of each value from X E - the list of bin edge values