How to convert a cell array that contains inside durations to a duration array

조회 수: 5 (최근 30일)
Hi, so thats my problem I got a cell array that contain inside a group of duration and I want to split this group of duration to not have the cells. How can I do it? I post the variable so you can see easely what I mean.

채택된 답변

Benjamin Thompson
Benjamin Thompson 2022년 2월 10일
Not very elegant but the brute force way to copy from your cell array to a duration array:
A = All_Time_msg_dist_Max{1};
for i = 1:length(All_Time_msg_dist_Max)
A(:,i) = All_Time_msg_dist_Max{i};
end
  댓글 수: 4
flashpode
flashpode 2022년 2월 10일
but this is gonna give me the second column after the first one? couse what I want is to get both durations of the cell consecutive.
flashpode
flashpode 2022년 2월 10일
Okay Its already done. I used duration.empty
thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by