2d histogram matrix in matlab: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.