i want to generate a vector of (1,10) size and value is in between 1 to 4

2 次查看(过去 30 天)
hh=[4 4 4 3 3 3 3 2 2 1]; like this

采纳的回答

KSSV
KSSV 2018-10-15
r = randi([1 4],1,10)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by