Extracting data from table hourly wise
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sree Harsha Bandaru
am 24 Jun. 2020
Kommentiert: Sree Harsha Bandaru
am 24 Jun. 2020
I am trying to calculate an average of a paramter for a particular hour in a day through out the month by reading the data from table.For example, this is my data in a table.
time temperature
01-Jan-2019 01:00:00 23
01-Jan-2019 02:00:00 29
01-Jan-2019 03:00:00 26
' '
' '
' '
31- Jan-2019 01:00:00 18
' '
31- Jan-2019 23:00:00 16
I have to do this for each hour in a day, so that i can get an average value of the temperature for each hour in a month. Output will be 24 temperature values.
I know that i need to store the each hour data for the whole month in a variable and then use the average to find the average value of that paramter for the whole month in that particular hour. But, i am facing difficulties to finding a way to extract that. I have referred many questions, but could not make a working code. Please, kindly help.
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 24 Jun. 2020
Bearbeitet: Alan Stevens
am 24 Jun. 2020
Extract the temperatures values from the table as a column vector, then
T = reshape(temperatures,24,31)';
Av = mean(T);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables 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!