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
HTMLPad 2018 15.5
WeBuilder 2018 15.5
SentiMask SDK Trial 2.0.0
Track Order For Magento 2 1.0.0
Calendar 365 For Dynamics CRM 4.0
Scimbo 1.2
Odoo Furnito Theme 1.0
.Net Assemblies/WSDL Import Utility for Delphi 6.0.4.0
Devart Excel Add-in for Zendesk 1.7
Excel Add-in for Marketo 1.7
GetOrgChart 2.5.3
AnyGantt JS Gantt Charts 8.6.0
AnyChart JS Charts and Dashboards 8.6.0
Multi Vendor Ecommerce Script & Apps 4.0
Magento 2 Inventory Management Extension 1.0
Top Code
HTMLPad 2018 15.5
MCU 8051 IDE 1.4.7
jQuery Slider Ken Burns 1.0
Gz Hotel Booking Script 2.0
Azizi search engine script PHP 4.1.10
BedRock IDE 1.0
Email Grabber
Guest Book V. 2 V2
XML Products Showcase Slider 1.0
Free Pageant Contest Source Code 1.0
ActivePerl 5.8.4.810/5.6.1.638
Extreme Injector 3.7
Image Reconstruction Demo (GUI) 1.0
MLM Software ONE 1.5.46
CardCheck COM DLL for Credit Card Processing 1.1
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
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
Invoice Manager by PHPJabbers 3.0
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
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