pmf = hist(X, max(X))' ./ numel(X); 或 制表 :t= tabulate(X);pmf = t(:, 3) ./ 100 ;可能还有至少10种其他方式... and there's probably at least 10 more ways doing so...对于 px ,只需在制表中使用 px = unique(X)或 t(:, 1) 解决方案等... for px just use px=unique(X), or t(:, 1) in the tabulate solution, etc... 这篇关于从数据到概率质量函数-Matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 21:57