I found an MVPA for brain fMRI toolbox online. There is one thing I cannot understand. The toolbox uses:
X = [ones(numTimeStampPerRun,1) [1:numTimeStampPerRun]']; % account for both offset and drift
to account for both offset and drift. I cannot understand what "offset" and "drift" represent in fMRI signal? Why does the toolbox use this format to account for both offset and drift?
My guess is that they are detrending the signal by regressing out x. In this case ones
part is the offset, and 1: numTimeStampPerRun
is the linear trend.
You can always just use detrend
in MATLAB though.
EDIT: more explicitly, the linear fit has the form:
x(t) = a*t + b*1
where t = 1:numTimeStampPerRun
.