This file is made to explain what steps I have taken in order to compare the 'histogram' program from the TISEAN package and the 'hist' function from GNU Octave.

First it is important to note that the results given from GNU Octave and from the 'histogram' in the TISEAN package vary in the form they are presented. 

Steps undertaken:

  1. Using 'histogram' I generated the results of 'histogram' into file 'amplitude_histogram.dat' using the command:
    '$histogram amplitude.dat -o "amplitude_histogram.dat" ' 
  2. I loaded 'amplitude.dat' into GNU Octave and ran function 
    'load amplitude.dat; [nn, xx] = hist (amplitude, 50, 1)'. 
  Number '50' is used as this is the default value of bins in the TISEAN program. And '1' as the last argument is neccessary so that 'hist' would normalize the histogram (sum of the bars is equal to '1')
  3. I loaded 'amplitude_histogram.dat' into GNU Octave and compared the first column with 'xx' obtained previously and the second with 'nn' (both 'nn' and 'xx' needed to be transposed) and save the result in 'result.dat'
    'load amplitude_histogram.dat; nn = transpose (nn); xx = transpose (xx); \
      diffa = [xx,nn] - amplitude_histogram.dat; save "difference.dat" diffa;'

Note: The difference of the left column was smaller than 1.0e-14 and the right column the largest difference was rather large at 4.0e-04 but it was in two places: one positive and one negative in the other. This means that both programs classified some values into two different bars -- should not be a problem. The rest of the result difference was smaller than 1.0e-17. 

Apart from the comments I made above the two tested functions produce the same results on the same data set. 

It is important to remember to call both functions differently:

TISEAN:
  'histogram data.dat -b#n -o data_hist.dat'

GNU Octave:
  'load data.dat; [nn, xx] = hist (data, #n, 1)'

  Then to save it in a file (like in TISEAN):
  'nn = transpose (nn); xx = transpose (xx); data_hist = [xx, nn]; save "data_hist.dat" data_hist'

