Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

hist (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the statistics class.

Syntax

hist(x)

hist(x, c)

hist(x, m)

n = hist(x, c)

[n, ctr] = hist(x)

[n, ctr] = hist(x, m)

Description

Counts the number of values that fall in specified intervals. If you do not request an output, LabVIEW returns a histogram plot.

Details

Examples

Inputs

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.

Outputs

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.

Details

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.

Examples

[N, C] = hist(rand(1, 100), 20)

[N, C] = hist(rand(1, 100))

N = hist(rand(1, 100), 0:0.1:1)

Related Topics

histc


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit