Member of the statistics class.
hist(x)
hist(x, c)
hist(x, m)
n = hist(x, c)
[n, ctr] = hist(x)
[n, ctr] = hist(x, m)
Counts the number of values that fall in specified intervals. If you do not request an output, LabVIEW returns a histogram plot.
| Name | Description |
| x | Specifies the data values. x is a matrix. |
| c | Specifies the centers of all intervals in which you want to divide the range of x. c is a matrix. The elements in c must be in ascending order. |
| m | Specifies the number of equally spaced intervals in which to divide the range of x. m is a positive integer. The default is 10. |
| Name | Description |
| n | Returns the number of elements that fall in each interval. n is an array of integers. |
| ctr | Returns the centers of all intervals if you do not specify c. ctr is an array. |
This function is supported in the LabVIEW Run-Time Engine only if you request an output from the function. This function can remain in your scripts when you build a stand-alone application or shared library, but if you do not request an output, the LabVIEW Run-Time Engine does not execute this function. If you request an output, the LabVIEW Run-Time Engine executes this function as normal.
[N, C] = hist(rand(1, 100), 20)
[N, C] = hist(rand(1, 100))
N = hist(rand(1, 100), 0:0.1:1)