# doc-cache created by Octave 10.1.0
# name: cache
# type: cell
# rows: 3
# columns: 12
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
bootts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 552
 Calculates non-parametric t-percentile bootstrap statistics.

 Calculates non-parametric t-percentile bootstrap statistics of a given time
 series.

 Input parameters:
   ts    ... Time series (trials x epochs)
   B     ... Number of resamplings (default: 300)
   alpha ... Alpha significance of confidence intervals (default: [0.1 0.05 0.01])
   med   ... 0: mean, 1: median (default: 0)
 
 Output parameters:
   ts_boot ... Bootstrapped time series
   cfl     ... Lower limit of confidence interval
   cfu     ... Upper limit of confidence interval



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
 Calculates non-parametric t-percentile bootstrap statistics.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
calcAveVar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1866
 Calculates the mean and variance of each channel.

 This function calculates the mean and variance of each channel. The results
 can be displayed with the function plotAveVar.

 Usage:
   r = calcAveVar(s, h, t);

 Input parameters:
   s         ... Input signal (as obtained by sload) <TxC>.
   h         ... Header structure (as obtained by sload) <1x1 struct>. Only the
                 following fields are required: h.SampleRate, h.TRIG,
                 h.Classlabel.
   t         ... Start point, time resolution and end point within a trial (in 
                 s) <1x3>. If the second value is 0, the time resolution
                 corresponds to 1/fs.
                 Example:
                   t = [0, 0.25, 8];
                   This corresponds to a trial that starts 0s after the trial
                   start event and lasts until second 8. 4 values per second
                   are calculated.

 Optional input parameters (variable argument list):
   'class'    ... List of classes used in the calculation <1xM>.
                  Default: all available classes are used.
   'bandpass' ... Bandpass filter cutoff frequencies (in Hz) <1 x 2>.
                  Default: No bandpass filter.
   'heading'  ... Heading of the plot <string>.
                  Default: No heading is used.
   'montage'  ... Topographic layout of channels <NxM>. This matrix consists of
                  zeros and ones. The channels are arranged in N rows and M
                  columns on the plot, and they are located where the values of
                  the matrix are equal to 1.
                  Default: A rectangular layout is used.
   'cue'      ... Draws a vertical line at the location of the cue (in s)
                  <1x1>.
                  Default: No cue is drawn.

 Output parameter:
   r ... Structure containing the results <1x1 struct>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
 Calculates the mean and variance of each channel.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
calcCombiMap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3815
 Calculates time-frequency (ERDS) maps.

 This function calculates time-frequency (ERDS) maps by using either bandpower,
 FFT or wavelets to estimate the power in specific frequency bands. Maps can be
 calculated for more than one channel at once.

 Usage:
   r = calcErdsMap(s, h, t, f_borders);

 Input parameters:
   s         ... Input signal (as obtained by sload) <TxC>.
   h         ... Header structure (as obtained by sload) <1x1 struct>. Only the
                 following fields are required: h.SampleRate, h.TRIG,
                 h.Classlabel.
   t         ... Start point, time resolution and end point within a trial (in 
                 s) <1x3>. If the second value is 0, the time resolution
                 corresponds to 1/fs.
                 Example:
                   t = [0, 0.25, 8];
                   This corresponds to a trial that starts 0s after the trial
                   start event and lasts until second 8. 4 values per second
                   are calculated.
   f_borders ... Frequency borders (in Hz) <1xF>. Contains the borders of the
                 frequency bands and can be used with the optional parameters
                 'f_bandwidths' and 'f_steps' (see below).
                 Examples:
                   f_borders = [6, 30];
                   The maps are calculated from 6Hz to 30Hz with the default
                   bandwidth and in the default frequency step size.

                   f_borders = [4, 12, 20, 40];
                   The maps are calculated for the segments 4-12Hz, 12-20Hz,
                   and 20-40Hz with the default bandwidths and step sizes.

 Optional input parameters (variable argument list):
   'method'       ... Calculation method <string>. User one of the following 
                      methods: 'bp', 'fft', 'wavelet'.
                      Default: 'bp'.
   'f_bandwidths' ... Bandwidths for the segments specified in f_borders (in
                      Hz) <1xF-1>.
                      Default: 2Hz in all segments.
   'f_steps'      ... Frequency step sizes for the segments specified in
                      f_borders (in Hz) <1xF-1>.
                      Default: 1Hz in all segments.
   'class'        ... List of classes used in the calculation <1xM>.
                      Default: all available classes are used.
   'ref'          ... Reference interval (in s) <1x2>.
                      Default: the whole trial is used as reference.
   'submean'      ... Subtract the mean signal to suppress evoked components 
                      <1x1 logical>.
                      Default: true.
   'sig'          ... Method to calculate the significance <string>. User one
                      of the following methods: 'boot', 'boxcox' or 'none'.
                      Default: 'none'.
   'lambda'       ... Parameter of the Box-Cox transform <1x1>. If lambda is 0,
                      the transform is a log-transform.
                      Default: 0.
   'alpha'        ... Significance level <1x1>. If 'sig' is set to 'none', this 
                      value is ignored.
                      Default: 0.01.
   'heading'      ... Heading of the plot <string>.
                      Default: No heading is used.
   'montage'      ... Topographic layout of channels <NxM>. This matrix
                      consists of zeros and ones. The channels are arranged in
                      N rows and M columns on the plot, and they are located 
                      where the values of the matrix are equal to 1.
                      Default: A rectangular layout is used.
   'cue'          ... Draws a vertical line at the location of the cue (in s)
                      <1x1>.
                      Default: No cue is drawn.

 Output parameter:
   r ... Structure containing the results <1x1 struct>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
 Calculates time-frequency (ERDS) maps.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
calcErdsMap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4569
 Calculates time-frequency (ERDS) maps.

 This function calculates time-frequency (ERDS) maps by using either bandpower,
 FFT or wavelets to estimate the power in specific frequency bands. Maps can be
 calculated for more than one channel at once.

 Usage:
   r = calcErdsMap(s, h, t, f_borders);

 Input parameters:
   s         ... Input signal (as obtained by sload) <TxC>.
   h         ... Header structure (as obtained by sload) <1x1 struct>. Only the
                 following fields are required: h.SampleRate, h.TRIG,
                 h.Classlabel.
   t         ... Start point, time resolution and end point within a trial (in 
                 s) <1x3>. If the second value is 0, the time resolution
                 corresponds to 1/fs.
                 Example:
                   t = [0, 0.25, 8];
                   This corresponds to a trial that starts 0s after the trial
                   start event and lasts until second 8. 4 values per second
                   are calculated.
   f_borders ... Frequency borders (in Hz) <1xF>. Contains the borders of the
                 frequency bands and can be used with the optional parameters
                 'f_bandwidths' and 'f_steps' (see below).
                 Examples:
                   f_borders = [6, 30];
                   The maps are calculated from 6Hz to 30Hz with the default
                   bandwidth and in the default frequency step size.

                   f_borders = [4, 12, 20, 40];
                   The maps are calculated for the segments 4-12Hz, 12-20Hz,
                   and 20-40Hz with the default bandwidths and step sizes.

 Optional input parameters (variable argument list):
   'method'       ... Calculation method <string>. User one of the following 
                      methods: 'bp', 'fft', 'wavelet'.
                      Default: 'bp'.
   'f_bandwidths' ... Bandwidths for the segments specified in f_borders (in
                      Hz) <1xF-1>.
                      Default: 2Hz in all segments.
   'f_steps'      ... Frequency step sizes for the segments specified in
                      f_borders (in Hz) <1xF-1>.
                      Default: 1Hz in all segments.
   'class'        ... List of classes used in the calculation <1xM>.
                      Default: all available classes are used.
   'ref'          ... Reference interval (in s) <1x2>.
                      Default: the whole trial is used as reference.
   'submean'      ... Subtract the mean signal to suppress evoked components 
                      <1x1 logical>.
                      Default: true.
   'sig'          ... Method to calculate the significance <string>. User one
                      of the following methods: 'boot', 'boxcox' or 'none'.
                      Default: 'none'.
   'lambda'       ... Parameter of the Box-Cox transform <1x1>. If lambda is 0,
                      the transform is a log-transform.
                      Default: 0.
   'alpha'        ... Significance level <1x1>. If 'sig' is set to 'none', this 
                      value is ignored.
                      Default: 0.01.
   'heading'      ... Heading of the plot <string>.
                      Default: No heading is used.
   'montage'      ... Topographic layout of channels <NxM>. This matrix
                      consists of zeros and ones. The channels are arranged in
                      N rows and M columns on the plot, and they are located 
                      where the values of the matrix are equal to 1.
                      Default: A rectangular layout is used.
   'cue'          ... Draws a vertical line at the location of the cue (in s)
                      <1x1>.
                      Default: No cue is drawn.
   'wide_trials'  ... Use samples before and after the trial definition to get 
                      rid of border effects when using the FFT method 
                      <1x1 logical>. Note that samples before the beginning of 
                      the first and after the end of the last trial are
                      required.
                      Default: true.
   'refmethod'    ... Calculation mode <string>. 'classic' uses the classical
                      approach with an averaged reference interval. 'trial'
                      uses an individual reference for each trial. 'absolute'
                      does not use references, but calculates bandpower maps
                      instead.
                      Default: 'classic'.

 Output parameter:
   r ... Structure containing the results <1x1 struct>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
 Calculates time-frequency (ERDS) maps.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
calcErdsMapBP


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3047
 Calculates time-frequency (ERDS) maps based on the bandpower (BP) method.

 This function calculates time-frequency (ERDS) maps by using a bandpass filter
 and subsequent squaring of the signals to estimate the power in specific
 frequency bands. Maps can be calculated for more than one channel at once.
 Note that this function should not be used directly, use calcErdsMap instead
 and specify 'bp' as the calculation method.

 Usage:
   r = calcErdsMapBP(s, h, t, f_borders, f_bandwidths, f_steps, class, ref, 
                     submean, sig, lambda, alpha);

 Input parameters:
   s         ... Input signal (as obtained by sload) <TxC>.
   h         ... Header structure (as obtained by sload) <1x1 struct>. Only the
                 following fields are required: h.SampleRate, h.TRIG,
                 h.Classlabel.
   t         ... Start point, time resolution and end point within a trial (in 
                 s) <1x3>. If the second value is 0, the time resolution
                 corresponds to 1/fs.
                 Example:
                   t = [0, 0.25, 8];
                   This corresponds to a trial that starts 0s after the trial
                   start event and lasts until second 8. 4 values per second
                   are calculated.
   f_borders ... Frequency borders (in Hz) <1xF>. Contains the borders of the
                 frequency bands and can be used with the optional parameters
                 'f_bandwidths' and 'f_steps' (see below).
                 Examples:
                   f_borders = [6, 30];
                   The maps are calculated from 6Hz to 30Hz with the default
                   bandwidth and in the default frequency step size.

                   f_borders = [4, 12, 20, 40];
                   The maps are calculated for the segments 4-12Hz, 12-20Hz,
                   and 20-40Hz with the default bandwidths and step sizes.
   f_bandwidths ... Bandwidths for the segments specified in f_borders (in Hz)
                    <1xF-1>.
   f_steps      ... Frequency step sizes for the segments specified in
                    f_borders (in Hz) <1xF-1>.
   class        ... List of classes used in the calculation <1xM>.
   ref          ... Reference interval (in s) <1x2>.
   submean      ... Subtract the mean signal to suppress evoked components 
                    <1x1 logical>.
   sig          ... Method to calculate the significance <string>. User one of
                    the following methods: 'boot', 'boxcox' or 'none'.
   lambda       ... Parameter of the Box-Cox transform <1x1>. If lambda is 0,
                    the transform is a log-transform.
   alpha        ... Significance level <1x1>. If 'sig' is set to 'none', this 
                    value is ignored.
   refmethod    ... Calculation mode <string>. 'classic' uses the classical
                    approach with an averaged reference interval. 'trial' uses
                    an individual reference for each trial.

 Output parameter:
   r ... Structure containing the results <1x1 struct>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
 Calculates time-frequency (ERDS) maps based on the bandpower (BP) method.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
calcErdsMapFFT


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3114
 Calculates time-frequency (ERDS) maps based on the FFT.

 This function calculates time-frequency (ERDS) maps by using the FFT to 
 estimate the power in specific frequency bands. Maps can be calculated for
 more than one channel at once. Note that this function should not be used
 directly, use calcErdsMap instead and specify 'fft' as the calculation method.

 Usage:
   r = calcErdsMapFFT(s, h, t, f_borders, f_bandwidths, f_steps, class, ref, 
                      submean, sig, lambda, alpha, wide_trials);

 Input parameters:
   s         ... Input signal (as obtained by sload) <TxC>.
   h         ... Header structure (as obtained by sload) <1x1 struct>. Only the
                 following fields are required: h.SampleRate, h.TRIG,
                 h.Classlabel.
   t         ... Start point, time resolution and end point within a trial (in
                 s) <1x3>. If the second value is 0, the time resolution
                 corresponds to 1/fs.
                 Example:
                   t = [0, 0.25, 8];
                   This corresponds to a trial that starts 0s after the trial
                   start event and lasts until second 8. 4 values per second
                   are calculated.
   f_borders ... Frequency borders (in Hz) <1xF>. Contains the borders of the
                 frequency bands and can be used with the optional parameters
                 'f_bandwidths' and 'f_steps' (see below).
                 Examples:
                   f_borders = [6, 30];
                   The maps are calculated from 6Hz to 30Hz with the default
                   bandwidth and in the default frequency step size.

                   f_borders = [4, 12, 20, 40];
                   The maps are calculated for the segments 4-12Hz, 12-20Hz,
                   and 20-40Hz with the default bandwidths and step sizes.
   f_bandwidths ... Bandwidths for the segments specified in f_borders (in Hz)
                    <1xF-1>.
   f_steps      ... Frequency step sizes for the segments specified in
                    f_borders (in Hz) <1xF-1>.
   class        ... List of classes used in the calculation <1xM>.
   ref          ... Reference interval (in s) <1x2>.
   submean      ... Subtract the mean signal to suppress evoked components
                    <1x1 logical>.
   sig          ... Method to calculate the significance <string>. User one of
                    the following methods: 'boot', 'boxcox' or 'none'.
   lambda       ... Parameter of the Box-Cox transform <1x1>. If lambda is 0,
                    the transform is a log-transform.
                    Default: 0.
   alpha        ... Significance level <1x1>. If 'sig' is set to 'none', this
                    value is ignored.
   wide_trials  ... Use samples before and after the trial definition to get
                    rid of border effects when using the FFT method 
                    <1x1 logical>. Note that samples before the beginning of 
                    the first and after the end of the last trial are required.

 Output parameter:
   r ... Structure containing the results <1x1 struct>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
 Calculates time-frequency (ERDS) maps based on the FFT.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
getErds


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 936
 Calculates ERDS values in the specified frequency band.

 This function calculates ERDS values in the specified frequency band and
 returns, in addition to the ERDS values, the power in the reference interval
 and a confidence interval.

 Usage:
   [erds, refp, cl, cu] = getErds(s, h, triallen, f, trls, class, rmartif, ref, submean, alpha);
 
 Input parameters:
   s        ... Input signal (as obtained by sload)
   h        ... Header structure (as obtained by sload)
   triallen ... Length of one trial (s)
   f        ... Frequency band (Hz)

 Optional input parameters:
   trls    ... Trials
   class   ... Class
   rmartif ... Remove artifacts
   ref     ... Reference interval (s)
   submean ... Subtract mean signal
   alpha   ... Significance level

 Output parameters:
   erds ... ERDS values of each channel
   refp ... Reference power of each channel
   cl   ... Lower confidence level
   cu   ... Upper confidence level



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
 Calculates ERDS values in the specified frequency band.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
getMontage


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1761
 Calculates spatial filter matrix for Laplacian derivations.
 
 Returns a spatial filter matrix used to calculate Laplacian derivations as
 well as indices used to plot in a topographical layout.
 Assuming that the data vector s is of dimension <samples x channels>, the
 Laplacian derivation s_lap can then be calculated by s_lap = s * lap.

 Usage:
   [lap, plot_index, n_rows, n_cols] = getMontage(montage);
   [...] = getMontage(montage, rrfile);

 Input parameters:
   montage ... Matrix containing the topographical layout of the channels. The
               content of this matrix can be one of the following formats: 
               (1) Channel numbers where channels are located and zeros
                   elsewhere <NxM>;
               (2) Ones where channels are located and zeros elsewhere <NxM>;
               (3) Predefined layout <string>.
               Examples for each format:
               (1) montage = [0 3 0; ...
                              4 1 2; ...
                              0 5 0];
               (2) montage = [0 1 0; ...
                              1 1 1; ...
                              0 1 0];
               (3) montage = '16ch';

 Optional input parameters:
   rrfile ... Name of the re-referencing file defining the spatial filter
              <string>. If the extension is empty, '.mtx' (MatrixMarket format)
              is added to the filename. This file can then be used with 
              (1) save2gdf -r=rrfile ... 
              (2) mexSLOAD(file, rrfile, ...
              (3) SigViewer

 Output parameters:
   lap        ... Laplacian filter matrix
   plot_index ... Indices for plotting the montage
   n_rows     ... Number of rows of the montage
   n_cols     ... Number of columns of the montage



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
 Calculates spatial filter matrix for Laplacian derivations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
plotAveVar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
 Displays the mean and standard deviation of each channel.

 This function displays the mean and standard deviation of each channel in a
 topographical layout as calculated by calcAveVar.m.

 Usage:
   plotAveVar(r);

 Input parameters:
   r ... Input structure calculated with calcAveVar.

 Optional input parameters (variable argument list):
   't_range' ... Time range to plot <1x2>. Specify start and end points within a 
                 trial (in s) to plot only a specific time range.
                 Default: The whole time range is plotted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
 Displays the mean and standard deviation of each channel.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
plotCombiMap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 276
 Displays time-frequency (ERDS) maps combined with mean and standard deviation.

 This function plots ERDS maps combined with mean and standard deviation of
 each channel.

 Usage:
   plotCombiMap(r);

 Input parameters:
   r ... Input structure calculated with calcCombiMap.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
 Displays time-frequency (ERDS) maps combined with mean and standard deviation.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
plotErdsMap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 465
 Displays time-frequency (ERDS) maps.

 This function plots ERDS maps as calculated by calcErdsMap.m.

 Usage:
   plotErdsMap(r);

 Input parameters:
   r ... Input structure calculated with calcErdsMap.

 Optional input parameters (variable argument list):
   't_range' ... Time range to plot <1x2>. Specify start and end points within a 
                 trial (in s) to plot only a specific time range.
                 Default: The whole time range is plotted.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
 Displays time-frequency (ERDS) maps.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
prepareData


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 357
 Template for using the EEG analysis toolbox.

 This batch file serves as a template for the EEG analysis toolbox. It shows
 examples of how to call specific functions, such as plotting ERDS maps. Just
 copy and paste the commands you need into your own batch file and adapt the
 parameters. For help on specific commands, see the corresponding help texts.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
 Template for using the EEG analysis toolbox.





