2D Histogram Calculation Matlab script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: hist2.m
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Laszlo Balkay (View more)

2D Histogram Calculation script description:




Publisher review:
2D Histogram Calculation - Quick computation of two-dimensional histogram of bivariate data 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; Requirements: ยท MATLAB Release: R13SP1
2D Histogram Calculation is a Matlab script for Statistics and Probability scripts design by Laszlo Balkay. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5