⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dirichrnd1.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function r = dirichrnd1(alpha)%% Obtain a single random sample from a Dirichlet distribution% with k-dimensional parameter vector alpha.%% The single sample obtained is the same dimension as alpha%% See dirichrnd to sample from more than one at a timefunction r = dirichrnd1(alpha)%% independent sample each dimension from a gamma distributionr = gamrnd(alpha,1,size(alpha));%% then normalize themr = r /sum(r);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -