FINDARRAY

버전 1.2.0.0 (1.72 KB) 작성자: Mukhtar Ullah
Find one array within another.
다운로드 수: 2.2K
업데이트 날짜: 2010/11/16

라이선스 보기

FINDARRAY Find one array within another
I = FINDARRAY(A,B,'first') for the array B returns an index array of
the same size as B containing the smallest absolute index in A for each
element of B which is a member of A and 0 if there is no such index.
FINDARRAY(A,B) is the same as FINDARRAY(A,B,'first').

I = FINDARRAY(A,B,'last') for the array B returns an index array of
the same size as B containing the highest absolute index in A for each
element of B which is a member of A and 0 if there is no such index.

I = FINDARRAY(A,B,'all') returns a NDIMS(B)+1 dimensional array such
that I(:,...,k) contains the k-th absolute index in A for each element
of B, 0 otherwise.

See also find, ismember

Example:

>> findarray(pascal(3),magic(2),'all')

ans(:,:,1) =
1 6
0 5
ans(:,:,2) =
2 8
0 0
ans(:,:,3) =
3 0
0 0
ans(:,:,4) =
4 0
0 0
ans(:,:,5) =
7 0
0 0

인용 양식

Mukhtar Ullah (2024). FINDARRAY (https://www.mathworks.com/matlabcentral/fileexchange/6018-findarray), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

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

Replaced if-else with switch-case.

1.0.0.0

optimised for speed