How to find two continuous words appear in the sentence

sir, Input cell arry
A= {' book is good','camera is working good', 'the picture quality is good'}
Query B={'is good'}
how to find index of the query string is appeared in the sentence.
my output is = 1,3
thanks.

 Accepted Answer

Use strfind .
For example, like this:
find(~cellfun('isempty',strfind(A,'is good')))

More Answers (1)

Categories

Asked:

on 22 Dec 2014

Edited:

on 22 Dec 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!