Tips

How to get feedback from the visitors?
Google Docs Form can be used to get feedback from the site visitors. Learn more here.

Some useful handy software

HOW to?

Recent site activity

411days since
Nepalese New Year 2068

ahist

ahist: Combined good features of hist and histc.

Version:1.0
03 Oct 2007 (Updated 03 Oct 2007)
File Size: 3 Bytes
File Format: m-file (MATLAB file)

Download from the link here.

 
File Information
Description AHIST Alternative to Histogram.  
 Motivation: to combine the good features of HIST and HISTC.  
 
 USAGE:  
            n = ahist(Y)  
            n = ahist(Y,nbin)  
            n = ahist(Y,xedges)  
 [n,xc,index] = ahist(...)  
                ahist(...) without output arguments produces a  
                histogram bar plot of the results.  
   
 INPUT:  
       Y: Vector or Matrix of data. If Y is Matrix, AHIST works down  
             the columns.  
    nbin: Number of bins  
  xedges: Matrix of edges for each column vector of data  
             
 OUTPUT:  
        n: Number of elements in each container.  
       xc: The position of the bin centers in X  
    index: Index matrix BIN.  
 
 FEATURES:  
 1. Returns the index matrix (histc)  
 2. Either uses nbins (hist) or xedges (histc)  
 3. Returns centre of the bin (hist)  
 4. Plot histogram of each column of matrix in subplots  
 
 WHY AHIST:  
 1. Note that in histc, the last bin counts any values of x that  
    match edges(end). But AHIST(Y) bins the elements of Y into 10 equally  
    spaced containers like in hist.  
 2. When working the matrix, HIST and HISTC uses same container based on  
    the range of the whole matrix for all column of the matrix.  
    But AHIST uses different container for each column based on the range  
    of data in each column. 
MATLAB release MATLAB 7.0.1 (R14SP1)