필터 지우기
필터 지우기

Find position of a column given a specified array

조회 수: 1 (최근 30일)
luca
luca 2019년 10월 17일
편집: Guillaume 2019년 10월 17일
Hi given the two arrays
BrB= [84 56 80 58 64 56 66 62 58];
Mritsum = [5.321, 26.485 , 0.268, 110.793, 1.745, 28.92, 24.200, 3.705, 0];
anf the array
point= [0 58];
Taking as assumptions that "BrB" and "Mritsum" have the same number of column. I want to find the exact column (idx) where I have tje combination of the values indicated in "point".
In this case I would like to obtain
idx=9

채택된 답변

Fabio Freschi
Fabio Freschi 2019년 10월 17일
idx = find(ismember([Mritsum(:) BrB(:)],point,'rows'))
  댓글 수: 2
luca
luca 2019년 10월 17일
Thanks Fabio
Guillaume
Guillaume 2019년 10월 17일
편집: Guillaume 2019년 10월 17일
or
find(Brb == point(1) & Mritsum == point(2))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by