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

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -