Quantize

fast and easy scalar quantization
135 Downloads
Updated 6 Jul 2016

View License

% Quantization of x.
%
% INPUT
% -----
%
% Several options are available as optional parameters, listed below:
%
% - 'centroids' : centroids to use. Default is []. If non-empty, all other
% parameters are ignored.
%
% If 'centroids' is not provided or empty, uniform quantization will be
% done. Parameters then are:
%
% - 'border_method': either QUANTILE (default) or ABSOLUTE
% - 'border_param': parameters for borders. depending on borders_method:
% * border_method==ABSOLUTE: the actual min and max value to use
% * border_method==QUANTILE: the quantiles to use for min and max.
% default is [0.1,0.9]
% - 'control_method': either 'RATE' (default) or 'DISTORSION'
% - 'control_param': parameter for quantization step. depending on
% control_method:
% * control_method==RATE: number of quantization cells
% * control_method==DISTORSION: size of quantization cells.
% - 'display': 1 or 0, whether or not to display some figure
%
% OUTPUT
% ------
% - xbar: quantized signal
% - misc: a structure containing the following fields:
% * centroids: the used centroids. min and max are the first and last
% ones, respectively
% * group: for each data point, gives the index of the selected
% centroid
% * delta: only there if centroids were not provided: selected
% quantization step
%--------------------------------------------------------------------------
% Antoine Liutkus, Inria, 2016

Cite As

Antoine Liutkus (2024). Quantize (https://www.mathworks.com/matlabcentral/fileexchange/58024-quantize), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Downloads in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

fixed a typo in the description