iid in Matlab

5 次查看(过去 30 天)
Natalia
Natalia 2011-7-3
Hey, guys! I need help to do the following operation in Matlab: miu= prob(a=a_h) and 1- miu = prob (a=a_l) and it follows iid.. How to do it?
Thank you in advance,
  1 个评论
bym
bym 2011-7-3
you have to provide more detail to get an answer

请先登录,再进行评论。

采纳的回答

Rick Rosson
Rick Rosson 2011-7-3
The rand function returns a pseudo-random, iid number between 0 and 1 with a uniform pdf. If you compare the result of calling rand to a desired threshold (e.g. miu), you will have the desired solution.
For more information:
doc rand
HTH.

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by