EXTRACT TABLE FROM DATA
Show older comments
Hi
I'm using the below script to extract some data to place in a table. When I run this script I get this error message. A1, A2 and A3 are all returned correctly as 1x35 double. T1, T2 and T3 are all incorrectly returned as 1x3 double. When I remove all T1, T2 and T3 variables from this script, A1-3 return as empty, just '[]'. Can anyone tell me why this is the case and why I get the error message belwo when I include the T1-3 variables in the script?
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in working_file_2 (line 29)
T1 = [T1; A1];
% Process: Select files using search query
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([path CONTAINS "ERP_perm_ROI"] AND [name CONTAINS "Perm t-test equal"]))');
T1 = [];
T2 = [];
T3 = [];
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 = find(pvalue(1,:)<=0.05);
A1 = pvalue(:,col);
A2 = tvalue(:,col);
A3 = time(:,col);
T1 = [T1; A1];
T2 = [T2; A2];
T3 = [T3; A3];
end
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!