extract data from structure into table with multiple columns instead of one column

5 ビュー (過去 30 日間)
Hi
I have my data stored in a structure. This data was collected from 59 participants. I want to extract some of this data into a table. The data I want to extract is stored in the structure as 30 rows x 1 column for each participant. When I extract the data using the script below I get a 1770 x 1 table (59x30=1770 so all the data is being placed in 1 column). What I want is a table with 59 columns (one for each participant) x 30 rows. Can anyone advise how I do this?
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([name CONTAINS "resample"]))');
T2 = [];
for iFile = 1:length(sFiles)
DataMat = in_bst_data(sFiles(iFile).ChannelFile)
ICA_selected = DataMat.Projector(2).CompMask;
T2 = [T2; ICA_selected];
end

採用された回答

Adam Danz
Adam Danz 2020 年 7 月 28 日
編集済み: Adam Danz 2020 年 7 月 28 日
Change
T2 = [T2; ICA_selected]
% ^ vertical concatenation
to
T2 = [T2, ICA_selected];
% ^ horizontal concatenation (requires vectors of equal height)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by