<< nan_histo3 Descriptive Statistics nan_iqr >>

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_histo4

nan_histo4

calculates calculates histogram of multidimensional data samples and supports data compression

Calling Sequence

R = nan_histo4(Y)
R = nan_histo4(Y,W)
[R,tix] = nan_histo4(Y)

Parameters

Y :

data, on sample per row, each sample has with size(Y,2) elements

W :

weights of each sample (default: []) W = [] indicates that each sample has equal weight

R :

is a struct with these fields :

R.X :

are the bin-values

R.H :

is the frequency of occurence of value X (weighted with W)

R.N :

are the total number of samples (or sum of W)

tix :

enables compression

R.X(tix,:

) : is the decompression step

Description

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)

Examples

x= [ 9 9 9 9 2 2 3 3 4 5 9 ]';
[R,tix]=nan_histo4(x)
disp(R.X(tix,:))

Bibliography

C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).

See also

Authors

<< nan_histo3 Descriptive Statistics nan_iqr >>