Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: reading a data file to searches on Date
Date: Mon, 6 Oct 2008 18:40:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <gcdm2m$nep$1@fred.mathworks.com>
References: <gc7qv5$pv0$1@fred.mathworks.com> <gc8gqk$49v$1@fred.mathworks.com> <gcal2u$aci$1@fred.mathworks.com> <gcaq2p$7lv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223318422 24025 172.30.248.37 (6 Oct 2008 18:40:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Oct 2008 18:40:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1538001
Xref: news.mathworks.com comp.soft-sys.matlab:493892


Hi Andres,
 Thank you very much.

John

"Andres " <rantore@werb.deNoRs> wrote in message <gcaq2p$7lv$1@fred.mathworks.com>...
> "John Smith" <cc200802@yahoo.com> wrote in message <gcal2u$aci$1@fred.mathworks.com>...
> > [..]
> > for example, i see
> > 
> > when I print A, where A=textscan(fid, '%s %f %f');
> >     {1202x1 cell}    [1202x1 double]    [1202x1 double]
> > 
> > I now want to do something like
> > IDX = find(A{1} == '05-Sep-08') 
> > it gives me error, 
> > 
> > 
> > ??? Undefined function or method 'eq' for input arguments of type 'cell'.
> > 
> > so I tried 
> > IDX = find(datevec(A{1} == datevec(05-Sep-08'))
> > 
> > ??? Error using ==> eq
> > Matrix dimensions must agree.
> > 
> >  
> > [..]
> 
> Hi John,
> don't use "==" a) on strings or b) to compare whole rows, it's meant as a numeric element-by-element operation (type doc eq). Use a string function instead, like strmatch or its relatives - see the doc.
> Hth
> Andres