cellstrfind

버전 1.0.0.0 (1.61 KB) 작성자: Marc Jakobi
similar to strfind, but for use with cell arrays
다운로드 수: 111
업데이트 날짜: 2016/10/5

라이선스 보기

cellstrfind: for finding strings within a cell array
Syntax: [tf, idx] = cellstrfind(C, S, option);
idx = cellstrfind(C, S, option);
Example: [tf, idx] = cellstrfind(C, 'This is a string', 2);

Input arguments:

- C: Cell-Array, in which to search for the string
- S: The string to search for in the cell array C
- option: 1 or 2 (double)
option = 1:
Include cell that contain S as part of the string
[e. g. the string 'This is a string' will be found,
if S = 'string';]
option = 2:
Include only cells that contain a string equal to S
[e. g. the string 'This is a string' will not be found if
S = 'string';]

Output arguments:

- idx: Index/Indexes of C containing S
- tf: True/False (logical) with true for the indexes containing S

Author: Marc Jakobi, 04.10.2016

Credits go to the Matlab Central users: Guillaume, Ian Esten and Jan Simon
for their contributions regarding the topic in the MATLAB Answers forum.

인용 양식

Marc Jakobi (2024). cellstrfind (https://www.mathworks.com/matlabcentral/fileexchange/59473-cellstrfind), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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