필터 지우기
필터 지우기

calculate the number of hours for each day meets certain criteria

조회 수: 5 (최근 30일)
AS
AS 2018년 4월 9일
댓글: Adam 2018년 4월 9일
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
Adam
Adam 2018년 4월 9일
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 );

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by