For Loop to calculate prob of pair of values occuring

1 Ansicht (letzte 30 Tage)
Mary Evans
Mary Evans am 25 Sep. 2020
Beantwortet: Star Strider am 25 Sep. 2020
I have a nx2 data vector. I am trying to loop through each row, check the values in the rows, and calculate the probabilty of times that a unique pair of values occur in the data vector. Any help pointing me in the right direction would be great please and thank you!

Antworten (1)

Star Strider
Star Strider am 25 Sep. 2020
Using the unique function with the 'rows' option may help.
If you want to include a tolerance if the elements are °close enough’ although not exactly the same, consider uniquetol with the 'ByRows' optiuon.

Kategorien

Mehr zu Matrices and 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!

Translated by