The ‘combine_specs’ function takes a series of spectra and combines them into a single spectrum, by adding a dimension to the spectra. The additional dimension is given a frequency axis that is simply numbered from 1 to the number of spectra. Useful for plotting a series of 2D spectra as a 3D plot.
spec=combine_specs(spec1,spec2,...);