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!