Thanks Gang.
I'm trying to obtain correlation matrix for all possible pairs of 40 ROIs for each subject. The 1ddot command (1ddot -dem -terse roi1.1D roi2.1D roi3.1D roi4.1D ... > subj1_corr_matrix.1D) gives the correlation matrix for each subject and now I wonder how to average them for a group analysis? In other words, average correlation coefficient for each ROI pair for the entire group!
Thanks,
Dinesh