필터 지우기
필터 지우기

How can we define equally- ranged bins in histogram?

조회 수: 10 (최근 30일)
ishita agrawal
ishita agrawal 2017년 8월 25일
댓글: Star Strider 2017년 8월 25일
Hi, Thank you for responding my previous questions. I have a dataset containing values between 0 to 1. I want to plot a histogram for bin ranges 0:0.1:1, i.e. [0-0.1, 0.1-0.2, 0.2-0.3......0.9-1.0]. Can anybody help with this? Thank you in advance.

채택된 답변

Star Strider
Star Strider 2017년 8월 25일
The easiest way is to use linspace, choose the minimum and maximum values, and select the vector length to be one more than the number of bins (here 10) to define the edges:
edges = linspace(0, 1, 11);
  댓글 수: 2
ishita agrawal
ishita agrawal 2017년 8월 25일
Thank you for the answer. For my case, 0-1 is working fine.
Star Strider
Star Strider 2017년 8월 25일
My pleasure.

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

추가 답변 (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