vmrand(fMu, fKappa, varargin)

버전 1.3.0.0 (4.76 KB) 작성자: Dylan Muir
Draw random numbers from the Von Mises distribution
다운로드 수: 1.8K
업데이트 날짜: 2017/8/16

라이선스 보기

This function uses an envelope-rejection method based on a wrapped Cauchy distribution to draw random variates from an arbitrary Von Mises distribution, first proposed in [1].
'fMu' and 'fKappa' are the mean and variance parameter of the Von Mises distribution over [-pi, pi). 'tVMVariates' will be a tensor containing random variates drawn from the defined distribution. If 'fMu' and 'fKappa' are non-scalar, then they must be the same size. In this case 'tVMVariates' will be the same size. If 'fMu' and 'fKappa' are scalar, then the number of variates returned can be specified as extra arguments.

Example:
vmrand(linspace(-pi, pi, 20), 2); % - Return variates for several distributions, with changing 'fMu'
vmrand(0, 2, [100 1]); % - Return 100 variates (size [100 1]) for the VM distribution with 'fMu' = 0 and 'fKappa' = 2
If only single dimension 'M' is provided, then the return argument 'tfVMVariates' will be M x M.

This implementation is vectorised, and requires O(7.5*N) space.

References:
[1] D. J. Best and N. I. Fisher, 1979. "Efficient Simulation of the von Mises Distribution", Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 28, No. 2, pp. 152-157.

인용 양식

Dylan Muir (2024). vmrand(fMu, fKappa, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/37241-vmrand-fmu-fkappa-varargin), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Updated description
Updated description
Updated usage
Updated description
Updated description
Updated description

1.2.0.0

Fixed a bug when no variates were accepted

1.1.0.0

Fixed bugs, where providing non-scalar parameters would sometimes cause an error message.

1.0.0.0