Effacer les filtres
Effacer les filtres

calculate the number of hours for each day meets certain criteria

5 vues (au cours des 30 derniers jours)
AS
AS le 9 Avr 2018
Commenté : Adam le 9 Avr 2018
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 commentaire
Adam
Adam le 9 Avr 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 );

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by