Borrar filtros
Borrar filtros

iid in Matlab

5 visualizaciones (últimos 30 días)
Natalia
Natalia el 3 de Jul. de 2011
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 comentario
bym
bym el 3 de Jul. de 2011
you have to provide more detail to get an answer

Iniciar sesión para comentar.

Respuesta aceptada

Rick Rosson
Rick Rosson el 3 de Jul. de 2011
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.
  1 comentario
Natalia
Natalia el 3 de Jul. de 2011
Thanks a lot, Rick Rosson!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by