[Master Index] [Index for export/lyngby]

lyngby_design_events2design

(export/lyngby/lyngby_design_events2design.m)


Function Synopsis

x = lyngby_design_events2design(e, TR, L, varargin)

Help text

 lyngby_design_events2design - Convert events to design matrix column

      function x = lyngby_design_events2design(e, TR, L, ...
         'PropertyName', 'PropertyValue')

      Input:  e       Events (in seconds)
              TR      Sampling time (in seconds)
              L       Length (number of scans)
              Property:
                Decimation     [ {FourierZero} |
                               FirstOrderInterpolation ] Type of
                               decimation
                Oversampling   {100*TR} Number of oversampling
                               compared to TR. Default is TR*10 that
                               corresponds to 10ms

      Output: x       Vector corresponding to decimated paradigm

      This function will take a set of events denoted by the time of
      occurence in eg. seconds are convert them to a vector that is
      suitable as a design variable or "paradigm" input to a filter. 

      The first element in x, ie. x(1), corresponds to zero
      seconds. The second element x(2) to the time at TR. x is length L. 

      The input 'e' should be a column vector or a matrix with size
      Nx2. If 'e' is a vector then the times in 'e' is taken as
      "Dirac"-events and if 'e' is a matrix then the first column
      should describe on-times while the second column should
      describe off-times.

      Example: 
        e = [ 20 31.56 45.20 52.4 70.1 ]';
        x = lyngby_design_events2design(e, 2, 50)
        plot(0:2:98, x, '-x')

      See also LYNGBY.

 $Id: lyngby_design_events2design.m,v 1.4 2002/05/19 22:25:30 fnielsen Exp $

Produced by mat2html on Wed Jul 29 15:43:40 2009
Cross-Directory links are: OFF