Skip to content

fewerbins

datafun · scripts/datafun/fewerbins.m

FEWERBINS  Recompute a histogram with fewer (coarser) bins (MATLAB compat).

  [N, EDGES] = FEWERBINS (DATA) bins DATA into roughly half as many bins
  as the automatic rule would choose and returns the bin counts N and the
  bin EDGES.  DATA may be a numeric vector or a struct with a 'Data'
  field (histogram-like object).

  [N, EDGES] = FEWERBINS (DATA, NBINS) uses NBINS bins directly.