For Loop to calculate prob of pair of values occuring

조회 수: 4 (최근 30일)
Mary Evans
Mary Evans 2020년 9월 25일
답변: Star Strider 2020년 9월 25일
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!

답변 (1개)

Star Strider
Star Strider 2020년 9월 25일
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.

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by