What is the difference between bins counts in binscatter and histcounts2?

4 ビュー (過去 30 日間)
Sergii Snegir
Sergii Snegir 2021 年 6 月 25 日
コメント済み: dpb 2021 年 6 月 25 日
Dear communitty,
can any one explaine why bin counts obtained by binscatter and histcounts2 are slightly different?
This is my code:
y10=log10(y);
h0=binscatter(x,y10,250)
counts_2=get(h0,'Values');
[counts2,xbin,ybin] = histcounts2(x,y10,250);
The data is enclosed to this post.
I compared the max values of the matrixes and they have small difference
max(counts_2(:)) % binscatter
ans =
106
>> max(counts2(:)) % histcounts2
ans =
109
  1 件のコメント
dpb
dpb 2021 年 6 月 25 日
That file is empty as just noted in other thread...
As for the difference, I'd guess it's how the two deal with either missing or extreme values -- binscatter dives off into a MATLAB graphics primitive without prior calling histcounts2 explicitly in the top-level m-file code and I didn't delve any further.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by