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 views (last 30 days)
Show older comments
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
Answers (1)
Voss
on 17 Oct 2022
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 Comments
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!