Table Of Contents


    Last Modified: March 15, 2017

    Counts the number of values that fall between the edges of specified intervals.


    n = histogramc(x, edges)
    [n, bin] = histogramc(x, edges)
    n = histogramc(x, edges, dim)
    [n, bin] = histogramc(x, edges, dim)
    Legacy name: histc



    Data values. x is a matrix or an array of any dimension.


    Edges of all intervals. edges is an array. The elements of edges must be in ascending order.


    Dimension. dim is an integer.



    Number of values that fall between edges. n is an array of integers. n(i) indicates the number of values in x that fall in the interval [edges(i), edges(i+1)]. -inf and +inf are valid values for edges. n(m) indicates the number of values in x that are equal to edges(m), where m is the length of edges.


    Bin that contains the corresponding value of x. bin(k) = j indicates that x(k) is in the interval [edges(j), edges(j+1)] when j<m-1, or x(k) = edges(m) when j = m. If bin(k) = 0, x(k) does not fall into any intervals. bin is an array of integers of the same length as x.

    [N, BIN] = histogramc(rand(1, 100), 0:0.1:1)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices

    Recently Viewed Topics