How to Find a Value From Another Value?
이전 댓글 표시
I have a matrix, so I would like to find a value from the first column by using values from the last columns. For example, I have an specific value from the last column which I found by suing "find". How can I then find the value from the first column from that specific row by using the last column value?
채택된 답변
추가 답변 (1개)
Andrei Bobrov
2017년 12월 7일
편집: Andrei Bobrov
2017년 12월 7일
A = reshape(1:16,4,[]); % Let A - your array (example)
out = A(A(:,end) == 14,1)
댓글 수: 2
Rafael
2017년 12월 7일
Andrei Bobrov
2017년 12월 7일
A = reshape(1:16,4,[]);
It's example of your array.
카테고리
도움말 센터 및 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!