Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: reading a data file to searches on Date
Date: Sun, 5 Oct 2008 16:30:17 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 27
Message-ID: <gcaq2p$7lv$1@fred.mathworks.com>
References: <gc7qv5$pv0$1@fred.mathworks.com> <gc8gqk$49v$1@fred.mathworks.com> <gcal2u$aci$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223224217 7871 172.30.248.38 (5 Oct 2008 16:30:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 5 Oct 2008 16:30:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:493709


"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