From: Luna Moon on
Hi all,

If I have a cell called A,

let's say A={'aa', 'bb', 'cc'},

what's the most efficient way to do

find(A=='aa')?

It seems getting an error in Matlab?
From: Luna Moon on
On Jan 28, 2:11 pm, Luna Moon <lunamoonm...(a)gmail.com> wrote:
> Hi all,
>
> If I have a cell called A,
>
> let's say A={'aa', 'bb', 'cc'},
>
> what's the most efficient way to do
>
> find(A=='aa')?
>
> It seems getting an error in Matlab?

>> find({'aa', 'bb', 'cc'}=={'aa'})
??? Undefined function or method 'eq' for input arguments of type
'cell'.

>> find({'aa', 'bb', 'cc'}=='aa')
??? Undefined function or method 'eq' for input arguments of type
'cell'.

From: TideMan on
On Jan 29, 8:12 am, Luna Moon <lunamoonm...(a)gmail.com> wrote:
> On Jan 28, 2:11 pm, Luna Moon <lunamoonm...(a)gmail.com> wrote:
>
> > Hi all,
>
> > If I have a cell called A,
>
> > let's say A={'aa', 'bb', 'cc'},
>
> > what's the most efficient way to do
>
> > find(A=='aa')?
>
> > It seems getting an error in Matlab?
> >> find({'aa', 'bb', 'cc'}=={'aa'})
>
> ??? Undefined function or method 'eq' for input arguments of type
> 'cell'.
>
> >> find({'aa', 'bb', 'cc'}=='aa')
>
> ??? Undefined function or method 'eq' for input arguments of type
> 'cell'.

help strmatch
From: Matt Fig on
TideMan <mulgor(a)gmail.com> wrote in message <0ebdbb21-b9f1-495f-8cd0-923e58c6d54b(a)m24g2000prn.googlegroups.com>...
> help strmatch

Or strcmp

A={'aa', 'bb', 'cc'}
strcmp(A,'aa')
From: Jan Simon on
Dear Luna!

> > let's say A={'aa', 'bb', 'cc'},
> >
> > what's the most efficient way to do
> >
> > find(A=='aa')?

find(strcmp(A, 'aa'))

Can you explain how it happend, that your post appears twice? This occurs frequently in the last tine and Sharo is searching for the source of this.

Kind regards, Jan