フィルターのクリア

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 Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by