Hi Donald, Thanks. I've downloaded peak_nii and put it in the Matlab path. The image file from which I want to extract peak voxel coordinates is called test.img. Below is what I input in Matlab: mapparameters.image='test.img'; mapparameters.type='T'; mapparameters.voxlimit=1000; mapparameters.thresh=[]; mapparameters.df1=[]; mapparameters.df2=[]; mapparameters.separation=8; mapparameters.SPM=0; mapparameters.label='SPMAnatomyMNI'; mapparameters.nearest=0 mapparameters.conn=18; mapparameters.cluster=0; mapparameters.mask=[]; mapparameters.out='test'; mapparameters.sign='pos'; peak_nii('test.img',mapparameters) Then below is the output which contains error message. Can you help me to figure out why? Thanks in advance. mapparameters = image: 'test.img' type: 'T' voxlimit: 1000 thresh: [] df1: [] df2: [] separation: 8 SPM: 0 label: 'SPMAnatomyMNI' nearest: 0 conn: 18 cluster: 0 mask: [] out: 'test' sign: 'pos' Using default option of 0 for threshold Using default option of whole brain for statistics, even if there is a mask. Using the default of no RESELS. FWHM was incorrectly specified or missing. Using the default corrected threshold of p<0.05. Using default option of no labels. Threshold is:0 Error using & Matrix dimensions must agree. Error in spm_Tcdf (line 88) md = ( ones(size(x)) & v>0 ); Error in peak_nii (line 183) QPs=sort(1-spm_Tcdf(realI,invar.df1)); %uncorrected P values in searched volume (for voxel FDR) - not the masked volume