Vectorized FIND

버전 1.0.0.0 (1.38 KB) 작성자: Steven Lord
This function returns the locations of the elements of a vector in a matrix.
다운로드 수: 2.3K
업데이트 날짜: 2002/3/12

라이선스 보기

If A is a matrix and b is a column vector, this function returns a column vector of indices I such that A(I)==b if the elements of b are in A. If an element of b is not in A, then the corresponding element of I is Inf.

As an example, you can execute the following code:

rand('state',0)
A=floor(20*rand(5))
b=[18;8;9;6]
I=findin(A,b)
A(I(1:3))

The example above uses I(1:3) because I(4) is Inf; the matrix A does not have 6 as an entry.

인용 양식

Steven Lord (2024). Vectorized FIND (https://www.mathworks.com/matlabcentral/fileexchange/1472-vectorized-find), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R12
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0