Writing covariable-corrected images

 Hi again,

I am trying to use the rest_Y_RegressOutCovariables function to write our covariable-corrected image files. I get the error below, which I was hoping you could help me with. I've double-checked, and the timeseries vectors are the correct length.
Thanks for your help,
Alex

 

 

Regressing Out Covariables:

 

     Read 3D EPI functional images: "/work/imaging8/af397/rest_analysis/vols/filtered/1002593_filtered".........................................................................................................................................................................

??? Error using ==> eq

Matrix dimensions must agree.

 

Error in ==> rest_writefile at 81

    if (dtype=='single')

 

Error in ==> rest_Y_RegressOutCovariables at 70

    rest_writefile(AllVolume(:, :, :, x), ...

Thank you for your report!
Please re-write the code:
if (dtype=='single')

to

if strcmp(dtype,'single')

I have made a multimedia course of DPARSF, you can get more information from it. I will upload it tomorrow.

 Great - that seems to have done the trick!

I just had a question about the detrending and filtering. I have been looking at ROI time courses at various stages of detrending and filtering.
I have noticed that after detrending, the linear trend does indeed seem to be removed, as is expected.
After filtering (.008 to .08 Hz) only (without detrending), I can clearly see the slower oscillations, although the linear trend is still present, as would be expected.
However, after detrending + filtering, the oscillations become very regular, and the time course has a strong linear trend.

This seems strange to me. Does the trend get added back into the time course during filtering? Does this sound normal?

Thanks again for your help,
Alex 

I just remember Xiao-Wei said this procedure is used to keep the same results as AFNI.
I am sorry I do not know more detailed reason.
Could Xiao-Wei, Xiang-Yu, Xi-Nian and Prof. Zang give more deep comments please?