# repelem (5)

Octave/Matlab: Extend a vector making it repeat itself?

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…

MATLAB: duplicating vector 'n' times

This question already has an answer here: Octave/Matlab: Extend a vector making it repeat itself? 2 answers I have a vector, e.g. vector=[1 2 3] I wo…

Replicate matrix one row at a time

This question already has an answer here: Duplicating a column vector into a longer column vector 3 answers A similar function to R's rep in Matlab[duplica…

How to make elements of multiple vectors repeated by MATLAB?

This question already has an answer here: Repeat elements of vector[duplicate] 3 answers I have 2 data vectors d1=[1 2 1 3 4] and d2=[3 1 2 1], and 2…

Element-wise Matrix Replication in MATLAB

I have a 3 dimensional matrix. I want to replicate the matrix of size 8x2x9 to a specified number of times in the third dimension given by a vector say[3, 2, 1, 1, 5, 4, 2, 2, 1] so that the resulta…