replace values in a matrix by their histogram bin numbers

1 Ansicht (letzte 30 Tage)
SChow
SChow am 19 Jan. 2022
Bearbeitet: KSSV am 19 Jan. 2022
I have a large matrix 10000x10000
As I draw a histogram by 10 bins, I was wondering if there is a simple way by which I can replace each element in the matrix by the corresponding bin numbers.
Thanks

Akzeptierte Antwort

KSSV
KSSV am 19 Jan. 2022
Bearbeitet: KSSV am 19 Jan. 2022
[N,E,bins] = histcounts(A) ;

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by