Finding daily min and max values for time series data
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sunshine Seventy
am 6 Sep. 2022
Bearbeitet: Cris LaPierre
am 6 Sep. 2022
I have a time series of data at 15 minute time intervals across a 400 day period. I am trying to extract the maximum and minimum from one column of data for each day, and then calculating the difference. I can get the maximum or minumum for each day but am unsure of how to get all of the maximim and minimum values for the entire dataset.
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 6 Sep. 2022
Bearbeitet: Cris LaPierre
am 6 Sep. 2022
Date = datetime(2016,6,4)+minutes(0:15:3000)';
X = rand(size(Date));
Y = rand(size(Date));
Z = rand(size(Date));
tbl = table(Date,X,Y,Z)
out = groupsummary(tbl,"Date","day",["max","min"],"Z")
out.Diff = out.max_Z-out.min_Z
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!