How can I find the continous time between two points( ex 1,2,3,4,5,6,7,8,9,10 in between 1 and 10)
조회 수: 2 (최근 30일)
이전 댓글 표시
I included the image, but how can I find the time inbtween T1 and T2. I want to find all time points between t1 and t2, like 20390, 20391,20392.... 20400, and 22578,22579,.....22588 and so on for every row
답변 (1개)
Voss
2022년 10월 17일
Here's your table:
DeltaShortTable = table( ...
[20390; 22578; 25894; 29041; 31924; 34937; 37982; 41045; 44022; 46905; 49676; 52264; 54934; 57565; 60374; 63475; 66871; 70152], ...
[20400; 22588; 25904; 29051; 31934; 34947; 37992; 41055; 44032; 46915; 49686; 52274; 54944; 57575; 60384; 63485; 66881; 70162], ...
'VariableNames',{'TEMPtensecpulsecT1' 'TEMPtensecpulsecT2'})
Here's one way to do what you want:
result = arrayfun(@(s,e)s:e, ...
DeltaShortTable.TEMPtensecpulsecT1,DeltaShortTable.TEMPtensecpulsecT2, ...
'UniformOutput',false)
If each pair of numbers always have the same difference (which they do in this case, that being 10), then you can do this:
result = vertcat(result{:})
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!