It says that C has only one column. Make sure that you created the C matrix as a simple text file. Don't create it on Windows or with a word processor. An easy way to create it is
echo 1 -1 > con.mtx

doug

On 11/26/14 9:44 PM, Xinfa Shi wrote:
Hi everyone,

I get this error when running group analysis of cortical thickness by command-line:

xin-fa@xinfa--PC:/media/E/FREESURFER/VisualData$ mri_glmfit --y lh.group_differ.thickness.10.mgh --fsgd group_differ.fsgd dods --C con.mtx --surf fsaverage lh --cortex --glmdir lh.group_differ.glmdir
gdfReadHeader: reading group_differ.fsgd
INFO: gd2mtx_method is dods
Reading source surface /media/E/FREESURFER/VisualData/fsaverage/surf/lh.white
Number of vertices 163842
Number of faces    327680
Total area         65416.648438
AvgVtxArea       0.399267
AvgVtxDist       0.721953
StdVtxDist       0.195470

$Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $
cwd /media/E/FREESURFER/VisualData
cmdline mri_glmfit --y lh.group_differ.thickness.10.mgh --fsgd group_differ.fsgd dods --C con.mtx --surf fsaverage lh --cortex --glmdir lh.group_differ.glmdir 
sysname  Linux
hostname xinfa--PC
machine  x86_64
user     xin-fa
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y    /media/E/FREESURFER/VisualData/lh.group_differ.thickness.10.mgh
logyflag 0
usedti  0
FSGD group_differ.fsgd
labelmask  /media/E/FREESURFER/VisualData/fsaverage/label/lh.cortex.label
maskinv 0
glmdir lh.group_differ.glmdir
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory lh.group_differ.glmdir
Loading y from /media/E/FREESURFER/VisualData/lh.group_differ.thickness.10.mgh
INFO: gd2mtx_method is dods
Saving design matrix to lh.group_differ.glmdir/Xg.dat
Normalized matrix condition is 1
Matrix condition is 1.04762
Found 149955 points in label.
Pruning voxels by thr: 0.000000
Found 149953 voxels in mask
Saving mask to lh.group_differ.glmdir/mask.mgh
Reshaping mriglm->mask...
search space = 74612.446501
ERROR: dimension mismatch between X and contrast con.mtx       X has 2 cols, C has 1 cols

The data is altogether 43 subjects,including 22 subjects in expert group.I just want to explore the difference between both groups.
Attached is the FSGD file ,which is two groups ,zero covariates . The contrast matrix is 1 -1 .

Subsequently I try it only with a few subjects ,and it succeeds. 
Can you help me ?

Best wishes.

Xin-Fa .




_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer