creating a row vector containing values between 1 and 6, each repeated exactly 4 times

1 次查看(过去 30 天)
Is there a way I could generate a row vector (1x 24) that contains the values 1 to 6 repeated exactly 4 times ?

采纳的回答

infinity
infinity 2019-6-22
Hello,
You can try this
a = 1:6;
b = repmat(a,1,4)
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by