I'm a newbie to Matlab and have a question about str locating:
A = ['abc','de','fghij','something','another'];
Then how can I get 3
if I use strfind(A,'fghij')
?
Thanks.
I'm a newbie to Matlab and have a question about str locating:
A = ['abc','de','fghij','something','another'];
Then how can I get 3
if I use strfind(A,'fghij')
?
Thanks.
I'm not exactly sure I understand your question, but if you are wondering why the value is 3 instead of 2 it is because matlab (unlike most languages you may be used to) indexes arrays starting at 1 instead of 0.
Thanks @TroyHaskin ! I find the answer in another post~
idx=find(ismemeber(A,'fghij'))
is what I want.