Daniel@0: % # of sample points Daniel@0: n_samples = 1000; Daniel@0: Daniel@0: p = ones(3,1)/3; Daniel@0: Daniel@0: % Low Entropy Daniel@0: alpha = 0.5*p; Daniel@0: Daniel@0: % High Entropy Daniel@0: %alpha = 10*p; Daniel@0: Daniel@0: % draw n_samples random points from the 3-d dirichlet(alpha), Daniel@0: % and plot the results Daniel@0: points = zeros(3,n_samples); Daniel@0: for i = 1:n_samples Daniel@0: points(:,i) = dirichletrnd(alpha); Daniel@0: end Daniel@0: Daniel@0: scatter3(points(1,:)', points(2,:)', points(3,:)', 'r', '.', 'filled');