Random number, Random integer

1 次查看(过去 30 天)
How To Generate two Non Repeating Random integers from 2 to 6?

采纳的回答

Daniel M
Daniel M 2019-11-5
x = 2:6;
y = x(randperm(length(x),2));

更多回答(0 个)

类别

Help CenterFile 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