特定の値を除く乱数の発生

12 visualizaciones (últimos 30 días)
ST
ST el 16 de En. de 2021
Comentada: ST el 18 de En. de 2021
例えば、1から10の範囲で15個の乱数を発生させるとき、1から10の中の特定の値を除いて行う方法はありますか。
以下の例のようにしたいです
(例)
1から10の範囲で『3』、『8』を除く15個の乱数
[5 9 10 7 2 6 2 1 5 4 5 10 2 7 1]

Respuesta aceptada

Shunichi Kusano
Shunichi Kusano el 18 de En. de 2021
こんにちは。
過去に同じ質問がありましたので、リンクを載せておきますね。
  1 comentario
ST
ST el 18 de En. de 2021
参考になりました。
ありがとうごいます。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 乱数発生器 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!