Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
.Net VCL for Delphi 1.0.0.0
ASP. NET C# PDF Software 4.5
LinqConnect Professional 4.8
CAD VCL: 2D/3D CAD in Delphi/C++Builder 14
wolfSSL 3.15.7
CAD DLL 14
AnyStock Stock and Financial JS Charts 8.4.2
ODBC Driver for SQLite 2.4
dotConnect for SugarCRM 1.7
dbForge SQL Complete 5.9
dbForge Studio for MySQL 8.0
.Net Runtime Library for Delphi 6.0.4.0
Scimbo 1.64
AnyMap JS Maps 8.4.2
GetOrgChart 2.5.3
Top Code
Cookie Monsters
Huffman Coding and Decoding for Text Compression 1.1
Faculty Evaluation System 1.1
College Management System Script 1.0.4
IFS fractal dimension calculation using box counting method
clunx 1.0
Member Login by PHPJabbers 3.2
3D World (OpenGL walk through city) Script 1.1
WETON: Javanese calendar 1.0
GUI for fuzzy based Washing Machine 1.0
Justdial Clone Script 2.0.1
Nevron User Interface for .NET Q1 2006
swfmill for XML Tools 1.1
Rich Text Editor for Classic ASP 8.0
Money Transfer 1.0
Top Rated
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
2D Histogram Calculation 1.0
File ID: 86204






2D Histogram Calculation 1.0
Download 2D Histogram Calculation 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 6
Submit Rating:
2D Histogram Calculation 1.0 Description
Description: function histmat = hist2(x, y, xedges, yedges)

Extract 2D histogram data containing the number of events of [x , y] pairs that fall in each bin of the grid defined by xedges and yedges. The edges are vectors with monotonically non-decreasing values.

The code is optimized no loop inside, it can be useful in the case of large dataset.

EXAMPLE

events = 1000000;
x1 = sqrt(0.05)*randn(events,1)-0.5; x2 = sqrt(0.05)*randn(events,1)+0.5;
y1 = sqrt(0.05)*randn(events,1)+0.5; y2 = sqrt(0.05)*randn(events,1)-0.5;
x= [x1;x2]; y = [y1;y2];

For linearly spaced edges:
xedges = linspace(-1,1,64); yedges = linspace(-1,1,64);
histmat = hist2(x, y, xedges, yedges);
figure; pcolor(xedges,yedges,histmat'); colorbar ; axis square tight;

For nonlinearly spaced edges:
xedges_ = logspace(0,log10(3),64)-2; yedges_ = linspace(-1,1,64);
histmat_ = hist2(x, y, xedges_, yedges_);
figure; pcolor(xedges_,yedges_,histmat_'); colorbar ; axis square tight;

License: Shareware

Related: linearly, spaced, linspace, sqrt randnevents, Dataset, figure, pcolorxedgesyedgeshistmat

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 6



More Similar Code

Hist2D performs a fast calculation of 2D histograms. On a 2GHz processor, calculated and displayed a histogram of 1 million points in less than half a second.

HIST2D 2D histogram

[H XBINS YBINS] = HIST2D(D, XN, YN, [XLO XHI], [YLO YHI])
[H XBINS YBINS] = HIST2D(D, 'display' ...)

HIST2D calculates a 2-dimensional histogram and returns the histogram array and (optionally) the bins used to calculate the...



PGFHIST2D(X, Y, W) will save a PNG file representing the 2D histogram created from data points specified by X and Y with weights specified by W. The vectors X, Y, and W must have the same number of elements. The text to include in a Latex file to...



2D histogram: Extract the number of joint events - (x,y) data value pairs that fall in each bin of the grid defined by xedges and yedges.

Uses:

[N,BIN] = HISTD(X,EDGES)

which returns

1) N is a...



%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...



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]
...



function H = histo2D(D,[Xlo Xhi],Xn,[Ylo Yhi],Yn,Xlab,Ylab,Title)

2-Dimensional Histogram
(size(H) == [Yn Xn])
Counts number of points in the bins defined by -
X = linspace(Xlo,Xhi,Xn) and
Y =...



SCATTERCLOUD creates a scatterplot from X and Y data sets, and overlays it on top of a density plot of the same data.

From the help:

SCATTERCLOUD display density of scatter data

SCATTERCLOUD(X,Y) creates a...



Generates a contour plot of a 2-column data set in which the 1st and 2nd column contains the X and Y variables, respectively.
Output variables can be specified interactively.
2D histogram output: Rows contain the distribution of the X...



This function creates a 2D scatterplot from two data vectors, and puts a univariate histogram for each vector at the horizontal and vertical axes of the plot.



Matlab code for calculation of 2d Gaussian Q function.

General description
This m-file provide a numerical computation of two-dimensional Gaussian Q-function, that is
...

User Review for 2D Histogram Calculation
- required fields
     

Please enter text on the image