From: Jay WONG on
hi,

If I want to check if string arrays contain "IG" or "HY" or "HVOL" . How do I do that?

If yes, it will return 1 and otherwise 0.

Is there any function like that? 'strfind' is not so straightforward.

thank you,
From: us on
"Jay WONG" <dcba7777(a)hotmail.com> wrote in message <i1fu31$6u4$1(a)fred.mathworks.com>...
> hi,
>
> If I want to check if string arrays contain "IG" or "HY" or "HVOL" . How do I do that?
>
> If yes, it will return 1 and otherwise 0.
>
> Is there any function like that? 'strfind' is not so straightforward.
>
> thank you,

a hint:

help regexp;

us
From: Andy on
"Jay WONG" <dcba7777(a)hotmail.com> wrote in message <i1fu31$6u4$1(a)fred.mathworks.com>...
> hi,
>
> If I want to check if string arrays contain "IG" or "HY" or "HVOL" . How do I do that?
>
> If yes, it will return 1 and otherwise 0.
>
> Is there any function like that? 'strfind' is not so straightforward.
>
> thank you,

What do you mean by "string arrays"? Why is strfind not straightforward? Please post the code you've tried, and state why the answer is not what you want or show any errors produced.