필터 지우기
필터 지우기

Finding first value in an array equal to each number in a vector

조회 수: 3 (최근 30일)
L'O.G.
L'O.G. 2023년 4월 22일
댓글: L'O.G. 2023년 4월 22일
I can find the first value in test_array that is equal to 2 using the following:
find(test_array==2, 1, 'first')
But how do I find the first value in test_array that is equal to, say, a vector of values? So the first value, for example, that is equal to 3, the first value that is equal to 5, the first value that is equal to 7, etc.?

채택된 답변

Walter Roberson
Walter Roberson 2023년 4월 22일
See the second output of ismember() -- you might need to exchange the parameters

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by