- 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?
조회 수: 8 (최근 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!