create_NDbins¶
- create_NDbins(bin_ranges, bin_widths, bin_steps, bin_methods)¶
CREATE_NDBINS Create N-dimensional bins with optional overlap
- Usage:
- [NDbin_edges, NDbin_centers, NDbin_coords, bin_edges, bin_centers] = …
create_NDbins(bin_ranges, bin_widths, bin_steps, bin_methods)
- Inputs:
bin_ranges : NDx2 double - [min max] per dimension – required bin_widths : 1xND double - bin width per dimension – required bin_steps : 1xND double - step size per dimension – required bin_methods : char or 1xND cell - per-dimension method (default: ‘full’)
Methods: ‘full’, ‘partial’, ‘full_extend’ (see create_bins)
- Outputs:
NDbin_edges : Kx1 cell - each cell is a 2xND edge matrix for one ND bin NDbin_centers : KxND double - centers of each ND bin NDbin_coords : KxND double - integer grid coordinates for each ND bin bin_edges : 1xND cell of 2xN per-dimension edges bin_centers : 1xND cell of 1xN per-dimension centers
Notes
Call with no arguments to run a built-in demo.
Example
- [NDbin_edges, NDbin_centers, ND_coords, bin_edges, bin_centers] = …
create_NDbins([-3 3; -2 2; -4 4], [1 1 1], [.1 .1 .1]);
See also: create_bins, hist_slide
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿