How do I show relative frequency on histogram?
조회 수: 15 (최근 30일)
이전 댓글 표시
Okay, I am supposed to make 1000 random values between 1 to 10 and plot them on the histogram to show the relative frequency.
Also my nbins must be 50
I have..
data=rand(10.*rand(1000,1)+1) hist(data,50)
It puts data on the histogram, but how do I show the relative frequency?
댓글 수: 0
채택된 답변
Star Strider
2014년 9월 8일
The relative frequency is the absolute frequency normalised by the total number of events. In your particular situation, you would get the relative frequency for each bin by dividing the empirical frequencies in each of your bins by 1000.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!