I have two cell arrays of size 1*32 but contains different size of columns like 1*145 double, 1*1035 double (screenshot attached). I want to concatenate them using following pseudo code. How can I do that? Any suggestions would help.
1 回表示 (過去 30 日間)
古いコメントを表示
initialize matrix data_concat of size channels X total time points
initialize matrix time_concat of size 1 X total time points
loop over data.trial and data.time (have the same size)
data_concat(:,appropriate time indices) = data.trial{k}(:,:);
time_concat(1,appropriate time indices) = data.time{k}(:);
end loop
data.trial = data_concat;
data.time = time_conc
0 件のコメント
採用された回答
Walter Roberson
2018 年 7 月 1 日
newtrial = horzcat(data.trial{:});
newtime = horzcat(data.time{:});
data.trial = newtrial;
data.time = newtime;
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!