calculates calculates histogram of multidimensional data samples and supports data compression
R = nan_histo4(Y) R = nan_histo4(Y,W) [R,tix] = nan_histo4(Y)
data, on sample per row, each sample has with size(Y,2) elements
weights of each sample (default: []) W = [] indicates that each sample has equal weight
is a struct with these fields :
are the bin-values
is the frequency of occurence of value X (weighted with W)
are the total number of samples (or sum of W)
enables compression
) : is the decompression step
nan_histo4 might be useful for data compression, because
The effort (in memory and speed) for compression is O(n*log(n)) The effort (in memory and speed) for decompression is only O(n)
x= [ 9 9 9 9 2 2 3 3 4 5 9 ]'; [R,tix]=nan_histo4(x) disp(R.X(tix,:)) | ![]() | ![]() |
C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).