How to find more than one string using find - strcmp?
Mostra commenti meno recenti
I need to find the location in a structure of these two strings: 'stm+' and 'stm-'.
I am using the simple following line code:
index = find(strcmp({EEG.event.code}, 'stm+')==1)
However, this finds only one string (ie, 'stm+').
How can I find both of them ('stm+' and 'stm-') so that matlab returns the position of all the strings?
I tried
index = find(strcmp({EEG.event.code}, 'stm+', 'stm-')==1)
but it doesn't work.
It's important to mention that I'm not looking for true or false answer, but the location (row number).
Thanks a lot for your help!!!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su C2000 Microcontroller Blockset in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!