frequency of wind speed in a particular direction

조회 수: 8 (최근 30일)
Jas singh
Jas singh 2020년 10월 18일
댓글: Jas singh 2020년 11월 13일
I'm trying to produce a table, which shows the frequency of a particular wind speed in a particular direction (see example in attachment). The left hand column on the example represents the wind speed values and at the top are the directions.
I have the direction and wind speed data collected from an anemometer in two variables in the workspace.
How would I go about producing this table?
Kind regards

채택된 답변

Chaitanya Mallela
Chaitanya Mallela 2020년 10월 21일
You can use table function to create a table from the workspace variables
T = table(windSpeed,Direction);
Also refer the documentation https://www.mathworks.com/help/matlab/matlab_prog/create-a-table.html for working with tables.

추가 답변 (1개)

Eric Sofen
Eric Sofen 2020년 11월 12일
It sounds like what you want is a 2D histogram where each bin represents the amount of time that the wind was blowing in a particular direction at a particular speed. Check out histcounts2 (and histogram2 for plotting). polarhistogram is also a nice visualization of "wind rose" data.
  댓글 수: 1
Jas singh
Jas singh 2020년 11월 13일
Thanks for the response, I solved the problem that I was going to use this table for in another way. But I'll keep histcounts in mind for future use.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by