Group wind data in clusters based on direction

6 visualizaciones (últimos 30 días)
Ancalagon8
Ancalagon8 el 8 de En. de 2023
Comentada: Star Strider el 23 de Feb. de 2023
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 comentarios
Ancalagon8
Ancalagon8 el 9 de En. de 2023
@Adam Danz, @Walter Roberson thank you for your detailed and well-explained answers.

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 8 de En. de 2023
Editada: Star Strider el 8 de En. de 2023
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 comentarios
Star Strider
Star Strider el 23 de Feb. de 2023
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Geographic Plots 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