How to find out coordinates of a value from a matrix?

조회 수: 1 (최근 30일)
Boni_Pl
Boni_Pl 2019년 8월 30일
편집: Image Analyst 2019년 8월 30일
Hello. I have a matrix
c=[1 2;
3 4;
5 6;
7 8;
9 10];
% and a vector
v=[0;0;5;0;5]
Now, how to get
5=[5 6;
9 10]
and
0=[1 2;
3 4;
7 8];
Kindly help.

답변 (1개)

madhan ravi
madhan ravi 2019년 8월 30일
c(v==5,:) % same for 0

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by