Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
Sergii Snegir
Sergii Snegir am 25 Jun. 2021
Kommentiert: dpb am 25 Jun. 2021
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 Kommentar
dpb
dpb am 25 Jun. 2021
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Type Identification finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by