Azzera filtri
Azzera filtri

calculate the number of hours for each day meets certain criteria

5 visualizzazioni (ultimi 30 giorni)
Hi, From an array of 8760 air temperature values, correspond to hourly data of one year. I want to calculate the number of hours for each day (which means for every 24 values of the array) that the temperature is above a certain value, for example 30oC. In addition, it will be nice to have the exact days that meet this criteria in day/month format. Any help will be highly appreciated.
  1 Commento
Adam
Adam il 9 Apr 2018
Use
doc reshape
to reshape to a 24*365 or 365*24 array then you can just use logical operators on the columns or rows
e.g.
temps = reshape( temps, 365, 24 );
above30 = t( t > 30 );
hoursPerDayAbove30 = sum( above30 );

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by