Prev: Simulink Index Vector can't access first element
Next: MLAPPClass times out in a multi threaded C# application
From: Luna Moon on 28 Jan 2010 14:11 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 28 Jan 2010 14:12 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 28 Jan 2010 14:26 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 28 Jan 2010 14:40 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 28 Jan 2010 15:36 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
|
Next
|
Last
Pages: 1 2 Prev: Simulink Index Vector can't access first element Next: MLAPPClass times out in a multi threaded C# application |