Sample a truncated multivariate normal distribution

版本 1.0.0 (1.6 KB) 作者: Yavor Kamer
Generates samples from a MVN within a lower and upper bound.
111.0 次下载
更新时间 2018/10/24

查看许可证

There exist many implementations on FEX solving the same problem, I wasn't very confident in using them as they sometimes failed to converge (using fsolve etc) or would generate warnings complaining about the covariance matrix being close to singular.
This is a simple brute-force method that records the accepted samples, adjusts the trial size and repeats until it has reached the target sample number.

引用格式

Yavor Kamer (2024). Sample a truncated multivariate normal distribution (https://www.mathworks.com/matlabcentral/fileexchange/69201-sample-a-truncated-multivariate-normal-distribution), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2015b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0