random fun.

1 次查看(过去 30 天)
huda nawaf
huda nawaf 2012-1-23
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

采纳的回答

Sean de Wolski
Sean de Wolski 2012-1-23

更多回答(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.

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by