Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: word occurence counting (DNA)
Date: Wed, 14 Apr 2010 07:59:06 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 29
Message-ID: <hq3ska$cpo$1@fred.mathworks.com>
References: <hp0f8k$snf$1@fred.mathworks.com> <hp0fpf$6re$1@fred.mathworks.com> <hp51me$adm$1@fred.mathworks.com> <hp52ih$ofc$1@fred.mathworks.com> <hp53f7$97n$1@fred.mathworks.com> <hp53vc$gtu$1@fred.mathworks.com> <hp54tn$2ii$1@fred.mathworks.com> <hp5cqk$1pr$1@fred.mathworks.com> <hp8ccl$1mu$1@fred.mathworks.com> <hp9pt1$go1$1@fred.mathworks.com> <hq3213$eua$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1271231946 13112 172.30.248.37 (14 Apr 2010 07:59:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 14 Apr 2010 07:59:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:626407

"ambrosia nightwish" <mess_imen@yahoo.fr> wrote in message <hq3213$eua$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hp9pt1$go1$1@fred.mathworks.com>...
> > Something like this?
> > 
> > s = 'AACCGTTAACGT';
> > k = 3;
> > 
> > d = double(s);
> > A = hankel(d(1:end-k+1),d(end-k+1:end));
> > [u i j] = unique(A,'rows');
> > b = zeros(length(i),1);
> > c = zeros(size(j));
> > for n=1:length(j)
> >     jn = j(n);
> >     b(jn) = b(jn)+1;
> >     c(n) = b(jn);
> > end
> > 
> > S = char(A)
> > c
> > 
> > % Bruno
> 
> How to convert S into a vector??

instead of just dumbly repeating your post, you should answer the questions people have asked you...
your performance here in CSSM is not boding well for your future...

us