Group wind data in clusters based on direction

6 次查看(过去 30 天)
I have an annual table with wind direction values and I want to group them per month in 16 sectors based on the degrees.
Is it possible to do it automatically either than manually?
  5 个评论

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2023-1-8
编辑:Star Strider 2023-1-8
One way to do this would be to use the histcounts function and get the first three outputs —
WindDir = rand(100,1)*360;
edgev = linspace(0, 360, 9);
[N,Edges,Octant] = histcounts(WindDir, edgev);
WindOctants = table(WindDir,Octant)
WindOctants = 100×2 table
WindDir Octant _______ ______ 123.39 3 272.97 7 352.43 8 10.679 1 199.56 5 205.31 5 258.28 6 329.39 8 146.07 4 171.63 4 333.69 8 328.55 8 85.531 2 331.01 8 92.321 3 232.95 6
The first output are the number of counts in each octant (bonus information), and the third is the respective octant.
EDIT — (8 Jan 2023 at 16:30)
Added table.
.
  20 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by