Is there a way to extend a vector by making it repeat itself?
>v = [1 2];
>v10 = v x 5; %x represents some function. Something like "1 2" x 5 in perl
Then v10 would be:
>v10
1 2 1 2 1 2 1 2 1 2
This should work for the general case, not just for [1 2]
v=[1 2]
andv100=kron(ones(1,100),v)
is the vectorv100=[v v ... v]
(100 times). If you want to concatenate some column-vectory
with itselfK
times, useyK=kron(ones(K,1),y)
. – Pantelis Sopasakis