How to count wind direction by year

조회 수: 1 (최근 30일)
Kristine
Kristine 2014년 6월 13일
댓글: Star Strider 2014년 6월 19일
Hi.
I have daily data of wind direction from 1973 to 2013, and I want to make a loop that separates the data according to a certain wind direction (22.5-67.5 degrees) and then do a count every year. So that I will end up with a matrix with (2013-1973=) 40 values.
How can I do this in matlab?
Thanks in advance, Kristine
  댓글 수: 3
Kristine
Kristine 2014년 6월 16일
This is the beginning of my data set:
1973 1 1 0 0 0 200.4
1973 1 2 0 0 0 247.08
1973 1 3 0 0 0 95.42
1973 1 4 0 0 0 86.67
1973 1 5 0 0 0 228
1973 1 6 0 0 0 155
1973 1 7 0 0 0 242.50
1973 1 8 0 0 0 156.96
1973 1 9 0 0 0 298.26
1973 1 10 0 0 0 276.36
Kristine
Kristine 2014년 6월 16일
So year, month, day, minute, second and wind direction

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

채택된 답변

dpb
dpb 2014년 6월 14일
Assuming you have (or can create) an array that has column containing year and another for direction (I'll use w for the wind column and y for year)...
a) segregate the direction data from the rest--
ix=iswithin(wdir,22.5,67.5);
b) count by year
n=hist(y(ix),[1973:2013]);
  댓글 수: 13
Kristine
Kristine 2014년 6월 19일
편집: Kristine 2014년 6월 19일
Thank you for looking at my data, if you ever do want the full data set this is where I found it:
Hourly data at www.ncdc.noaa.gov:
Select Data Access
Select Quick Links under Data Access
Select Integrated Surface Data, Hourly, Global under Quick Links
Select ISD/CDO under Integrated Surface Database (ISD), Hourly, Global
Select Simplified Options
Interesting article. In Hawaii we might experience drought-like conditions, and we may also get bigger winter swells.
Star Strider
Star Strider 2014년 6월 19일
Cool! Thanks!

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by