在函数库里只找到了多元正态分布和多元t分布(没有多元卡方分布,哎。。。)
摘抄下来,以便之后学习和应用
多元正态随机数
mvnrnd
Multivariate normal random numbers
Syntax
R = mvnrnd(MU,SIGMA)
r = mvnrnd(MU,SIGMA,cases)
Description
R = mvnrnd(MU,SIGMA) returns an n-by-d matrix R of random vectors chosen from the multivariate normal distribution with mean MU, and covariance SIGMA. MU is a vector or n-by-d matrix, andmvnrnd generates each row of R using the corresponding row of mu. SIGMA is a d-by-d symmetric positive semi-definite matrix, or a d-by-d-by-n array. If SIGMA is an array, mvnrnd generates each row of R using the corresponding page of SIGMA, i.e., mvnrnd computes R(i,:) using MU(i,:) and SIGMA(:,:,i). If the covariance matrix is diagonal, containing variances along the diagonal and zero covariances off the diagonal, SIGMA may also be specified as a 1-by-d vector or a 1-by-d-by-n array, containing just the diagonal. If MU is a 1-by-d vector, mvnrnd replicates it to match the trailing dimension of SIGMA.
r = mvnrnd(MU,SIGMA,cases) returns a cases-by-d matrix R of random vectors chosen from the multivariate normal distribution with a common 1-by-d mean vector MU, and a common d-by-dcovariance matrix SIGMA.
多元t分布随机数
mvtrnd
Multivariate t random numbers
Syntax
R = mvtrnd(C,df,cases)
R = mvtrnd(C,df)
Description
R = mvtrnd(C,df,cases) returns a matrix of random numbers chosen from the multivariate t distribution, where C is a correlation matrix. df is the degrees of freedom and is either a scalar or is a vector with cases elements. If p is the number of columns in C, then the output R has cases rows and p columns.
Let t represent a row of R. Then the distribution of t is that of a vector having a multivariate normal distribution with mean 0, variance 1, and covariance matrix C, divided by an independent chi-square random value having df degrees of freedom. The rows of R are independent.
C must be a square, symmetric and positive definite matrix. If its diagonal elements are not all 1 (that is, if C is a covariance matrix rather than a correlation matrix), mvtrnd rescales C to transform it to a correlation matrix before generating the random numbers.
R = mvtrnd(C,df) returns a single random number from the multivariate t distribution.
最后
以上就是友好外套最近收集整理的关于matlab生成多元随机数多元正态随机数mvnrnd多元t分布随机数mvtrnd的全部内容,更多相关matlab生成多元随机数多元正态随机数mvnrnd多元t分布随机数mvtrnd内容请搜索靠谱客的其他文章。
发表评论 取消回复