Hi
I have a struct file sFiles (a 1x144 struct file). This contains the results of t-tests perfomed on neuro-imaging data (I conducted 144 analyses and around 35 were p < 0.05. I opened a substruct/field in sFiles and called it DataMat (a struct with 37 fields). I wanted to extract data from 4 fields in DataMat based on a certain criteria. Three fields have corresponding forms (1x103 double) with the t values, p values and the time in the experiment for each value. I have managed to extract all the t values with a p value < 0.05 and the time at which it occured and place them in a table (using col variable). I can't figure out how to get the name of each analysis (in DataMat.Comment) with a p value < 0.05. Can anyone advise how I do this?
David
sFiles = [];
bst_report('Start', sFiles);
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([path CONTAINS "ERP_perm_ROI"] AND [name CONTAINS "Perm t-test equal"]))');
T1 = [];
T2 = [];
T3 = [];
T4 = [];
for iFile = 1:length(sFiles)
DataMat = in_bst_data(sFiles(iFile).FileName);
analysis = {DataMat.Comment}
tvalue = DataMat.tmap
pvalue = DataMat.pmap
time = DataMat.Time
col = min(find(DataMat.pmap(1,:)<=0.05));
A1 = pvalue(:,col);
A2 = tvalue(:,col);
A3 = time(:,col);
A4 = analysis;
T1 = [T1; A1];
T2 = [T2; A2];
T3 = [T3; A3];
T4 = [T4; A4];
end