random fun.

hi, is there way to chose one no. from two numbers randomly for ex. 2,3 i.e each time chose 2 or 3 randomly

更多回答(1 个)

Andrew Newell
Andrew Newell 2012-1-23
randint + 2;
or
randint(m,n) + 2;
for a matrix of random numbers.
or
R = a + randint(m,n)*(b-a);
to choose between any two integers a and b.

类别

帮助中心File Exchange 中查找有关 Random Number Generation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by