- 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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
KALYAN ACHARJYA
am 5 Mai 2020
Bearbeitet: KALYAN ACHARJYA
am 5 Mai 2020
One Way:
Antworten (1)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!