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!