Lets Learn together... Happy Reading

" Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference "-Robert Frost

Array Search

Let's search the cell array and find the index. This simple example will help to find the index in cell array of large size.

names={'Hilda' 'Helen' 'Ada'; 'Matthew' 'Jenny' 'Justin'; 'Agnes' 'Merlin' 'Mark';}

names = 

    'Hilda'      'Helen'     'Ada'   
    'Matthew'    'Jenny'     'Justin'
    'Agnes'      'Merlin'    'Mark'  

I need to know whether the name 'Justin' exists in this cell array


ans =


Let me retrieve the name 'Justin'  , using the index


ans =


like button Like "IMAGE PROCESSING" page


Enjoyed Reading? Share Your Views

Previous Post Next Post Home
Related Posts Plugin for WordPress, Blogger...
Google ping Hypersmash.com