about offset and drift in Matlab

70 views Asked by At

I found this toolbox online.

There is one thing I cannot understand. The toolbox use:

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 the toolbox use this format to account for both offset and drift?

1

There are 1 answers

3
Memming On BEST ANSWER

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.