Main Content

nctrnd

Noncentral t random numbers

Syntax

R = nctrnd(V,DELTA)
R = nctrnd(V,DELTA,m,n,...)
R = nctrnd(V,DELTA,[m,n,...])

Description

R = nctrnd(V,DELTA) returns a matrix of random numbers chosen from the noncentral T distribution using the corresponding degrees of freedom in V and noncentrality parameters in DELTA. V and DELTA can be vectors, matrices, or multidimensional arrays. A scalar input for V or DELTA is expanded to a constant array with the same dimensions as the other input.

R = nctrnd(V,DELTA,m,n,...) or R = nctrnd(V,DELTA,[m,n,...]) generates an m-by-n-by-... array. The V, DELTA parameters can each be scalars or arrays of the same size as R.

Examples

nctrnd(10,1,5,1)
ans =
  1.6576
  1.0617
  1.4491
  0.2930
  3.6297

References

[1] Evans, M., N. Hastings, and B. Peacock. Statistical Distributions. 2nd ed., Hoboken, NJ: John Wiley & Sons, Inc., 1993, pp. 147–148.

[2] Johnson, N., and S. Kotz. Distributions in Statistics: Continuous Univariate Distributions-2. Hoboken, NJ: John Wiley & Sons, Inc., 1970, pp. 201–219.

Extended Capabilities

Version History

Introduced before R2006a