Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

histogram (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: statistics

Requires: MathScript RT Module

Syntax

histogram(x)

histogram(x, c)

histogram(x, m)

n = histogram(x, c)

[n, ctr] = histogram(x)

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

Legacy Name: hist

Description

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

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

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes (if you request output)
Supported on RT targets Yes (if you request output)
Suitable for bounded execution times on RT Not characterized

Examples

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

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

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

Related Topics

histogramc


 

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