我是靠谱客的博主 友好外套,最近开发中收集的这篇文章主要介绍matlab生成多元随机数多元正态随机数mvnrnd多元t分布随机数mvtrnd,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

在函数库里只找到了多元正态分布和多元t分布(没有多元卡方分布,哎。。。)

摘抄下来,以便之后学习和应用

多元正态随机数

mvnrnd

Multivariate normal random numbers

collapse all in page

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 SIGMAMU is a vector or n-by-d matrix, andmvnrnd generates each row of R using the corresponding row of muSIGMA 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

collapse all in page

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所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(74)

评论列表共有 0 条评论

立即
投稿
返回
顶部