Call pts with z value within a range
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
Let's say, I have matrix A (kx3 matrix): (X,Y,Z coordinate)
A=[1 1 1; 2 2 2; 1 2 1; 9 9 2; 5 5 5; 6 6 6; 3 2 1; 1 1 9; 2 2 8];
A=[1 1 1
      2 2 2
      1 2 1
      9 9 2
      5 5 5
      6 6 6
      3 2 1
      1 1 9
      2 2 8];
If i want to call matrix B somehow the Z coordinate (value in 3rd column) is satisfy condition (1<Z<9):
result_B=[ 2 2 2;  9 9 2; 5 5 5; 6 6 6; 2 2 8];
How can I do that?
댓글 수: 0
채택된 답변
  madhan ravi
      
      
 2019년 8월 14일
        
      편집: madhan ravi
      
      
 2019년 8월 14일
  
       z = A(:,3);
 result_B = A((z>1)&(z<9),:)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

