📄 dirichrnd1.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 + -