<< nan_histo2 Descriptive Statistics nan_histo4 >>

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_histo3

nan_histo3

calculates histogram for multiple columns with common bin values among all data columns, and can be useful for data compression.

Calling Sequence

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

Parameters

Y :

data

W :

weight vector containing weights of each sample, number of rows of Y and W must match. default W=[] indicates that each sample is weighted with 1. R : is a struct with th fields

R :

struct with these fields

R.X :

the bin-values, bin-values are equal for each channel thus R.X is a column vector. If bin values should be computed separately for each data column, use nan_histo2

R.H :

is the frequency of occurence of value X

R.N :

are the number of valid (not %nan) samples

tix :

enables compression

R.tix:

provides a compressed data representation.

R.compressionratio :

estimates the compression ratio

R.X(tix) and R.X(R.tix):

reconstruct the orginal signal (decompression)

Description

Data compression can be performed in this way

[R,tix] = histo3(Y) is the compression step

The effort (in memory and speed) for compression is O(n*log(n)).

The effort (in memory and speed) for decompression is O(n) only.

Examples

x= [ 9 9 9 9 2 2 3 3 4 5 9 ]';
[R,tix]=nan_histo3(x)
disp(R.X(R.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_histo2 Descriptive Statistics nan_histo4 >>