2D Histogram Matrix

バージョン 1.0.0.0 (1.21 KB) 作成者: Kangwon Lee
Returns a matrix of number of points in each bins defined by two vectors.
ダウンロード: 13.1K
更新 2006/7/18

ライセンスがありません

編集メモ: This file was selected as MATLAB Central Pick of the Week

function mHist = hist2d ([vY, vX], vYEdge, vXEdge)
2 Dimensional Histogram
Counts number of points in the bins defined by vYEdge, vXEdge.
size(vX) == size(vY) == [n,1]
size(mHist) == [length(vYEdge) -1, length(vXEdge) -1]

EXAMPLE

mYX = rand(100,2);
vXEdge = linspace(0,1,10);
vYEdge = linspace(0,1,20);
mHist2d = hist2d(mYX,vYEdge,vXEdge);

nXBins = length(vXEdge);
nYBins = length(vYEdge);
vXLabel = 0.5*(vXEdge(1:(nXBins-1))+vXEdge(2:nXBins));
vYLabel = 0.5*(vYEdge(1:(nYBins-1))+vYEdge(2:nYBins));
pcolor(vXLabel, vYLabel,mHist2d); colorbar

引用

Kangwon Lee (2024). 2D Histogram Matrix (https://www.mathworks.com/matlabcentral/fileexchange/1487-2d-histogram-matrix), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R11.1
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersHistograms についてさらに検索
謝辞

ヒントを与えたファイル: 2-Dimensional Histogram

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0

Code cleaning