필터 지우기
필터 지우기

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 7월 1일
newtrial = horzcat(data.trial{:});
newtime = horzcat(data.time{:});
data.trial = newtrial;
data.time = newtime;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by