From: ambrosia nightwish on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hp9pt1$go1$1(a)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??
From: us on
"ambrosia nightwish" <mess_imen(a)yahoo.fr> wrote in message <hq2q20$aqn$1(a)fred.mathworks.com>...
> "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hp9pt1$go1$1(a)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??

what kind of ...vector... do you mean(?)...

us
From: dpb on
ambrosia nightwish wrote:
....

> How to convert S into a vector??

You mean like

S(:)' % ?

--
From: ambrosia nightwish on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hp9pt1$go1$1(a)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??
From: us on
"ambrosia nightwish" <mess_imen(a)yahoo.fr> wrote in message <hq3213$eua$1(a)fred.mathworks.com>...
> "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hp9pt1$go1$1(a)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