The following Matlab project contains the source code and Matlab examples used for 2d histogram matrix.
function mHist = hist2d ([vY, vX], vYEdge, vXEdge)
2 Dimensional Histogram
Counts number of points in the bins defined by vYEdge, vXEdge.
The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.