Filter löschen
Filter löschen

Generate a random sequence with assigned probabiity

1 Ansicht (letzte 30 Tage)
Shailee Yagnik
Shailee Yagnik am 16 Okt. 2019
Beantwortet: Jeff Miller am 17 Okt. 2019
Suppose we have 4 symbols [1 2 3 4] with each having probability []0.5 0.1250 0.1250 0.250]
How can i generate a sequence randomly accordiing to the assigned probabilities?

Antworten (1)

Jeff Miller
Jeff Miller am 17 Okt. 2019
Homework? OK, here's a hint: Imagine that you have an array with 8 positions and that you choose array positions randomly (each position has probability 0.125). Now imagine that some of the symbols 1-4 appear in more than one in array position.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by