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

density_kernel (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

d = density_kernel(x)

d = density_kernel(x, xi)

d = density_kernel(x, xi, 'pName', pValue...)

[d, xo] = density_kernel(x)

[d, xo] = density_kernel(x, xi)

[d, xo] = density_kernel(x, xi, 'pName', pValue...)

[d, xo, w] = density_kernel(x)

[d, xo, w] = density_kernel(x, xi)

[d, xo, w] = density_kernel(x, xi, 'pName', pValue...)

Legacy Name: ksdensity

Description

Computes the probability density estimate of the input vector.

Examples

Inputs

Name Description
x Specifies a real vector of sample points.
xi Specifies the points where the probability density is estimated.
pName/pValue Specifies one or more property name/value pairs that control the probability density estimation. pName is a string that accepts the following values:

'kernel' pValue specifies the kernel window used in the density estimation process. pValue is a string that accepts the following values:

'normal' (default) Use the normal function as the kernel window.
'box' Use the rectangle function as the kernel window.
'triangle' Use the triangle function as the kernel window.
'epanechnikov' Use the epanechnikov function as the kernel window.
'npoints' pValue specifies the length of xi. The default is 100.
'width' pValue specifies the width of the kernel window.

Outputs

Name Description
d Returns the probability density values estimated at xo.
xo Returns the points where the probability density is estimated.
w Returns the width of the kernel window.

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

X = randnormal(1, 128);
Y = density_kernel(X);

Related Topics

histogram
histogramc


 

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