Set all negative values in the matrix to 0
constraintNonNegativity(x, d)
x
data matrix (spectra or contributions)
d
matrix with the original spectral values