Borrar filtros
Borrar filtros

calculate the number of hours for each day meets certain criteria

5 visualizaciones (últimos 30 días)
AS
AS el 9 de Abr. de 2018
Comentada: Adam el 9 de Abr. de 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 comentario
Adam
Adam el 9 de Abr. de 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 );

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by