Identify interval completion by strings
조회 수: 8 (최근 30일)
이전 댓글 표시
I have an array of strings representing various intervals from human-entered data. E.g.,
startA
startB
on
endA
off
endB
...
I need to ensure each unique start is followed by its unique stop, not containing another unique start within that interval or vice versa for ends. If this does occur, I need to return the indices of the previous and following string, e.g. (startA -> missing end -> startA, return both startAs). I'm struggling to find an eluquent solution for this.
댓글 수: 0
답변 (1개)
Image Analyst
2021년 12월 11일
Try using strfind() or contains() or ismember() to identify indexes where specific words occur.
댓글 수: 3
Image Analyst
2021년 12월 13일
Attach the file with the words in it. I think you need to use readcell() on that file to import those words into a cell array.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!