histogramc (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

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

Owning Class: statistics

Requires: MathScript RT Module

Syntax

n = histogramc(x, edges)

[n, bin] = histogramc(x, edges)

Legacy Name: histc

Description

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

Examples

Inputs

Name Description
x Specifies the data values. x is a matrix. If x is a 2D matrix, histogramc performs a column-wise histogram count.
edges Specifies the edges of all intervals. edges is an array. The elements of edges must be in ascending order.

Outputs

Name Description
n Returns the 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 Returns the 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) = -1, x(k) is out of range. bin is an array of integers of the same length as x.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

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

Related Topics

histogram

文章是否对您有帮助?

没有帮助