Calculating the differences between XY pairs in a matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello friends,
I have this mega matrix (1000:4) with observations that has 0 and 1 on the last column.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/407010/image.png)
The second and third column contains the observations' x,y coordinates in m distance. I want to create a condition where it can output the rows that include 0, satisfy the condition that the measured distance between an observation of 0 and 1 that were less than 5m and then count the no. of observations that satisfied both conditions.
How could I list them out? I realise that the essential functions that I can use could be for loop, count and else if.
Thanks.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!