Finding the edges of equally distanced bins
조회 수: 3 (최근 30일)
이전 댓글 표시
I am using 2014a version which doesn't have the histcounts function. Is there a way to find the edges of 10 equally distanced bins in a histogram other than the histcounts function?
채택된 답변
Image Analyst
2015년 8월 5일
[counts,centers] = hist(data, nBins);
So you know the centers. And that means you know the width
binWidth = centers(2)-centers(1)
So the left most edge is just centers - binWidth/2 and the right most edge is centers(end)+binWidth/2, or overall it should be
edges = [centers-width/2, centers(end)+binWidth/2];
댓글 수: 0
추가 답변 (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!