How to bin a large amount of data

조회 수: 1 (최근 30일)
Akhil Ghanta
Akhil Ghanta 2015년 6월 19일
답변: Abhiram Bhanuprakash 2015년 6월 22일
I have 10^5 x and y coordinates that form a single trajectory plot show below. My question is how do I efficiently bin this to create a density plot?

답변 (1개)

Abhiram Bhanuprakash
Abhiram Bhanuprakash 2015년 6월 22일
Hi Akhil,
From what I understand, I think you are looking to create a two-dimensional (bivariate) histogram in MATLAB.
There is a function hist3 using which you can control the binning -> documentation here
But you would need to have Statistics and Machine Learning Toolbox in MATLAB R2015a (Statistics Toolbox in older releases) for this.
If you want to do it without Statistics Toolbox, you can go for a little trick as described here or you can also try out a MATLAB Central File Exchange Submission called 2-Dimensional Histogram --> link to this page here
Hope this helps,
Cheers!
Abhiram

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by