Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using correlation to search for subvector within a binary time series (bitstream)
Date: Tue, 9 Apr 2013 19:50:21 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <kk1rdt$52n$1@newscl01ah.mathworks.com>
References: <kk1fn4$nrr$1@newscl01ah.mathworks.com> <kk1kgd$aon$1@newscl01ah.mathworks.com> <kk1l6m$cv6$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1365537021 5207 172.30.248.48 (9 Apr 2013 19:50:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Apr 2013 19:50:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:793103

> >  m = length(u);
> >  n = length(v);
> >  f = find(all(bsxfun(@eq,hankel(u(1:n),u(n:m)),v),2));
- - - - - - -
  I didn't get that right.  It should be:

 f = find(all(bsxfun(@eq,hankel(u(1:m-n+1),u(m-n+1:m)),v),2));

Roger Stafford