필터 지우기
필터 지우기

Frequency histogram for selected values in a vector

조회 수: 5 (최근 30일)
Dimitrios Bentis
Dimitrios Bentis 2017년 10월 5일
댓글: Rik 2017년 10월 14일
I have 3 vectors time, wind speed and wind direction. I want to plot a histogram showing the relative frequency (or the absolute frequency) of occurrence of wind speeds below 4 knots for every 30 degree arc. In that way i will be able to see which 30 degree arc has the highest frequency of wind speeds below 4 knots.
  댓글 수: 2
Rik
Rik 2017년 10월 5일
And your question is?
Have a read here and here. It will greatly improve your chances of getting an answer.
Dimitrios Bentis
Dimitrios Bentis 2017년 10월 11일
I do not know how to plot a histogram with the relative frequencies of wind speeds below 4 knots. How can i do that?

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

채택된 답변

Rik
Rik 2017년 10월 11일
You can use logical indexing to filter your data:
LowWindData=data(WindSpeed<4);
histogram(LowWindData)
See doc histogram what other options you have to achieve a result that best suits your needs.
  댓글 수: 3
Dimitrios Bentis
Dimitrios Bentis 2017년 10월 14일
I still can't find how to get the relative frequency of that histogram. It plots the absolute frequency. How do i get the same histogram but with relative instead of absolute frequency?
Rik
Rik 2017년 10월 14일
Why don't you read the documentation?
'Normalization' Type of normalization
'count' (default) | 'probability' | 'countdensity' | 'pdf' | 'cumcount' | 'cdf'

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by