Quantcast
Channel: MATLAB Central Newsreader - tag:"find"
Viewing all articles
Browse latest Browse all 55

Re: Find an element in a cell array

$
0
0
Hi
How would I know what's there in cell corresponding to column and row from some different data-set
e.g.
A=findstr(s,[65531 65523])
415

Now I want to see what value does row1 and column 415 has in different data set named TIME
Is there any function which can compare the cell from A with new data set and give the value present at that row and column ?
Thanks!





"us" wrote in message <hte8tp$h8k$1@fred.mathworks.com>...
> "Gonzalo " <glpita@gmail.com> wrote in message <hte8e2$dv6$1@fred.mathworks.com>...
> > Hi there,
> >
> > How can I find en element inside a cell? I mean the row and column??
> >
> > Say that I have the following:
> >
> > stts = {'Gable','Hip','Shed','Other'};
> > var = 'Shed'
> >
> > I need to know that var is in position (1,3) of stts. Any ideas???
> >
> > Thanks
>
> one of the many solutions
>
> s={'a','bb','ccc','ddd'};
> t='ccc';
> [rn,cn]=find(strcmp(s,t));
> disp([rn,cn]);
> % 1 3
>
> us

Viewing all articles
Browse latest Browse all 55

Trending Articles