Function to make a 2D histogram

版本 1.3.0.0 (1.4 KB) 作者: Sisi Ma
Make 2D histogram on pairs of (x,y) data
3.0K 次下载
更新时间 2013/3/7

查看许可证

%A Simple function that makes a 2D histgram

% Input: data: two cols, x value; y value
% xrange: range and bins for x value (edges)
% yrange: range and bins for y value (edges)
%Output: Count of a specifice (x,y) bin combination;
% Suggested visualizing tool: I like to use imagesc; bar3 will work fine
% too; have to change axis label though

Example:
data(:,1)=randn(100000,1);
data(:,2)=randn(100000,1);
count=hist2d(data,-1:0.1:1,-1:0.1:1);
imagesc(count);

引用格式

Sisi Ma (2024). Function to make a 2D histogram (https://www.mathworks.com/matlabcentral/fileexchange/29709-function-to-make-a-2d-histogram), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.3.0.0

bug fixed

1.0.0.0