histo4 [tsa]
HISTO4 calculates histogram for rows and supports data compression

R = HISTO4(Y)
R is a struct with th fields
R.X  are the bin-values
R.H  is the frequency of occurence of value X
R.N  are the number of samples

HISTO4 might be useful for data compression, because
[R,tix] = histo4(Y)
is the compression step
R.X(tix,:)
is the decompression step

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)

see also: HISTO, HISTO2, HISTO3, HISTO4

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