extract specific points from a matrix of planar coordinates
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a 600x2 matrix with a series of planar points: x values on first column and y values on second one. How can I extract only the x values for which the corresponding y is null? Thank you!
댓글 수: 1
John Chilleri
2017년 5월 1일
편집: John Chilleri
2017년 5월 1일
What type of variable is your matrix (i.e. cell)? Or if it's a normal matrix, how do you define null?
답변 (2개)
KSSV
2017년 5월 1일
Let A be your 600*2 matrix.
x = A(:,1) ;
y = A(:,2) ;
iwant = x(y==0) ; % respective _x_ for which y=0
참고 항목
카테고리
Help Center 및 File Exchange에서 Computational Geometry에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!