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

1 view (last 30 days)
hh=[4 4 4 3 3 3 3 2 2 1]; like this

Accepted Answer

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

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!