Range of numbers repeating in an array matlab -
how can have range of numbers repeating in array in matlab number of times?
for instance, if want range of numbers 1:5 repeated 100 times stored in 1 array; code it?
a = [1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,........]
thanks
use repmat
repeat vectors or matrices.
n=5 m=100 a=repmat(1:n,1,m)
Comments
Post a Comment