histogram (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

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

文章是否对您有帮助?

没有帮助