I have a 1x5 cell which might look something like:
A = {'asd','pqr','asd 123','pqr123','asd 1','dfg',}
When I do:
strfind(A,'asd')
I get
[1] [] [1] [] [1] []
However, I want an exact match. i.e. I desire
[1] [] [] [] [] []
How do I achieve above ?
Use strcmp (case-sensitive) or strcmpi (case-insensitive).
strcmp(A,'asd');
gives the following ans:
1 0 0 0 0 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With