Calculates the spectrum of each channel. This function calculates the spectrum of each channel in the input signal. Two conditions have to be specified, first the reference interval (to be plotted in blue), and second the activation interval (to be plotted in red). Usage: r = calcSpectra(s, h, triallen, refint, actint, trls, class, rmartif, montage, f, name); Input parameters: s ... Input signal (as obtained by sload) h ... Header structure (as obtained by sload) triallen ... Length of one trial (s) refint ... Reference interval (s) actint ... Activation interval (s) Optional input parameters: trls ... Trials class ... Class rmartif ... Remove artifacts montage ... Electrode montage f ... Upper frequency limit to display name ... Name of the data set (or subject) Output parameter: r ... Structure containing the results