Histogram with log Bin width
조회 수: 120 (최근 30일)
이전 댓글 표시
I have a single column vector with values ranging from 0 to about 400 000.
I need to make a histogram from this data, which has a logarithmically changing bin size.
The height values in each bin should also be divided with the corresponding bins width.
How can this be done?
Advice would be appreciated,
Thanks
댓글 수: 0
채택된 답변
Sean de Wolski
2020년 8월 3일
x = rand(1,10000)*100000;
bins = 10.^(0:5);
histogram(x, bins);
set(gca, "XScale", "log")
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!