next | previous | forward | backward | up | index | toc

# histogram -- histogram of a list of real numbers

## Synopsis

• Usage:
h = histogram(L,n)
• Inputs:
• L, a list, of numbers in RR or QQ or ZZ
• n, an integer, the number of subintervals to be considered.
• Outputs:
• h, a list, of n integers, the number of entries in L in i-th equidistant subdivision of the interval from min L to max L

## Description

We compute h_i the number to elements in the i-th equidistant subdivision of the interval [min L, max L] into n parts

 i1 : M=(randomChainComplex({20,20},{20},ZeroMean=>true)).dd_1; 40 40 o1 : Matrix ZZ <-- ZZ i2 : (svds,U,Vt)=SVD(M**RR_53); i3 : (entries matrix {svds})_0/log o3 = {6.37106, 6.31472, 6.27245, 6.10348, 6.02102, 5.98252, 5.92934, 5.83927, ------------------------------------------------------------------------ 5.72509, 5.63923, 5.51957, 5.51441, 5.45378, 5.3237, 5.14787, 5.11063, ------------------------------------------------------------------------ 4.80679, 4.71988, 4.56427, 3.9834, -28.9278, -29.882, -29.9428, ------------------------------------------------------------------------ -30.1491, -30.2498, -30.359, -30.5514, -30.7528, -30.8016, -30.8016, ------------------------------------------------------------------------ -30.8016, -30.8016, -30.8016, -30.8016, -30.8016, -30.8016, -30.8016, ------------------------------------------------------------------------ -30.8221, -31.4002, -32.7696} o3 : List i4 : maximalEntry M o4 = 138 o4 : RR (of precision 53) i5 : histogram(svds/log,10) o5 = {20, 0, 0, 0, 0, 0, 0, 0, 0, 20} o5 : List i6 : histogram(svds_{0..19}/log,10) o6 = {1, 0, 1, 2, 2, 1, 4, 2, 4, 3} o6 : List i7 : histogram(svds_{20..39}/log,10) o7 = {1, 0, 0, 1, 0, 12, 3, 2, 0, 1} o7 : List

## Ways to use histogram :

• histogram(List,ZZ)

## For the programmer

The object histogram is .