- Get the array
- Read the first element
- Count the repetitions of the first element
- pdf_first=repetitions/length(array)
How can I find the probability of each term in the array?
12 ビュー (過去 30 日間)
古いコメントを表示
Let's say we have an arrary such [1,1,2,3,5,5], how can I find the probability of the terms? I am quite new in Matlab and I could not solve the problem.
Thanks!
2 件のコメント
KALYAN ACHARJYA
2020 年 5 月 5 日
編集済み: KALYAN ACHARJYA
2020 年 5 月 5 日
One Way:
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!