how can I find a specific data in time table in matlab?
Ältere Kommentare anzeigen
I am trying to extract the freez-thaw cycles in a timetable.freezing of stone only occur when the temperature drops below−3 °C in a day and thawing when temperature rises above 1 °C in next day. My quastion is that how can I define a function for it and then retime the time table based on it.
I need to find the days with mean temperature below−3 °C, followed by a day with mean temperature above 1 °C.(meteorological data file in attachment.)
Akzeptierte Antwort
Weitere Antworten (1)
Sebastian Bomberg
am 17 Okt. 2019
You can offset temperature by one day and compare against >= 4.
idx = data_mean_daily.tabrizmat7(1:end-1) >= 2 & ... % temp at current day greater 2 AND
data_mean_daily.tabrizmat7(2:end) >= 4; % temp at next day greate 4
data_mean_daily(idx,:)
idx has one row less than data_mean_daily but the missing last row will be treated as false anyway.
1 Kommentar
Andrei Bobrov
am 18 Okt. 2019
+1
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!