


'hist_update': update of a current global histogram by inclusion of a new field
------------------------------------------------------------------------
[val,HIST]=hist_update(val,HIST,C,dC)
OUTPUT:
val: vector of field values at which the histogram is determined (middle of bins)
HIST(:,icolor): nbre of occurence of the field value in the bins whose middle is given by val
can be a column vector, same size as val, or a matrix with three columns, for color images
INPUT:
val: existing field values from the current histogram, =[] if there is no current histogram
HIST(:,icolor): current histogram, =[] if there is none
can be a column vector (icolor=1), same size as val, or a matrix with three columns, for color images
C(:,icolor): vector representing the current field values
can be a column vector (icolor=1), or a matrix with three columns, for color images
dC: width of the new bins extending val to account for the new field.