|
Thank you. Yes, I mentioned 'string' only as an example, because I did not know how to use ismember for numerical values. It was my question:) But your solution works fine. Thanks again.
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <j8at7f$5cn$1@newscl01ah.mathworks.com>...
> "Liana" wrote in message <j89lov$67l$1@newscl01ah.mathworks.com>...
> > Hello,
> >
> > I need to find a numerical value in cell array:
> >
> > cont(1) = {1}; cont(2) = {5}; cont(3) = {8};
> > ind = find(ismember(cont, 'string1')==5)
>
> >
> > What should be written instead of 'string1' to define cell array of numbers? I am expecting to get ind = 2.
>
> why not using
> find([cont{:}] == 5)
>
> I don't understand why you use ISMEMBER with string on numerical data.
>
> Bruno
|